code: def from_json(json):
          
          points = []
          for point in json['points']:
              points.append(Point.from_json(point))
          return Segment(points)
docs: Creates a segment from a JSON file.
  
          No preprocessing is done.
  
          Arguments:
              json (:obj:`dict`): JSON representation. See to_json.
          Return:
              :obj:`Segment`