code: def from_json(cls, data, result=None):
          
          if data.get("type") != cls._type_value:
              raise exception.ElementDataWrongType(
                  type_expected=cls._type_value,
                  type_provided=data.get("type")
              )
  
          tags = data.get("tags", {})
  
          way_id = data.get("id")
          node_ids = data.get("nodes")
          (center_lat, center_lon) = cls.get_center_from_json(data=data)
  
          attributes = {}
          ignore = ["center", "id", "nodes", "tags", "type"]
          for n, v in data.items():
              if n in ignore:
                  continue
              attributes[n] = v
  
          return cls(
              attributes=attributes,
              center_lat=center_lat,
              center_lon=center_lon,
              node_ids=node_ids,
              tags=tags,
              result=result,
              way_id=way_id
          )
docs: Create new Way element from JSON data
  
          :param data: Element data from JSON
          :type data: Dict
          :param result: The result this element belongs to
          :type result: overpy.Result
          :return: New instance of Way
          :rtype: overpy.Way
          :raises overpy.exception.ElementDataWrongType: If type value of the passed JSON data does not match.