code: def from_json(cls, data):
          
          optional_keys = ('city', 'state', 'country', 'latitude', 'longitude',
                           'time_zone', 'elevation', 'station_id', 'source')
          for key in optional_keys:
              if key not in data:
                  data[key] = None
  
          return cls(data['city'], data['state'], data['country'], data['latitude'],
                     data['longitude'], data['time_zone'], data['elevation'],
                     data['station_id'], data['source'])
docs: Create a location from a dictionary.
  
          Args:
              data: {
              "city": "-",
              "latitude": 0,
              "longitude": 0,
              "time_zone": 0,
              "elevation": 0}