code: def serialize(cls, geolocation):
          
  
          obj = {}
  
          cls.add_if_not_none(obj, cls._FIELD_LATITUDE, geolocation.latitude)
          cls.add_if_not_none(obj, cls._FIELD_LONGITUDE, geolocation.longitude)
          cls.add_if_not_none(obj, cls._FIELD_ALTITUDE, geolocation.altitude)
          cls.add_if_not_none(obj, cls._FIELD_RADIUS, geolocation.radius)
  
          return obj
docs: :type geolocation: object_.Geolocation
  
          :rtype: dict