code: def to_geo_json_geometry(label):
      """Returns a GeoJSON ``geometry`` dict representation for the given
      location.
  
      Args:
          label: a :class:`fiftyone.core.labels.GeoLocation` o
              :class:`fiftyone.core.labels.GeoLocations` instance
  
      Returns:
          a GeoJSON dict
      """
      if isinstance(label, fol.GeoLocations):
          return _to_multi_geo_collection(label)
  
      if not isinstance(label, fol.GeoLocation):
          return None
  
      num_shapes = (
          int(label.point is not None)
          + int(label.line is not None)
          + int(label.polygon is not None)
      )
  
      if num_shapes == 0:
          return None
  
      if num_shapes == 1:
          return _to_geo_primitive(label)
  
      return _to_geo_collection(label)
  
imports: import logging
  import os
  import eta.core.serial
  import eta.core.utils
  import fiftyone.core.fields
  import fiftyone.core.labels
  from fiftyone.core.sample import Sample
  import fiftyone.core.storage
  import fiftyone.core.utils
  import fiftyone.core.validation
  import fiftyone.utils.data
label_desc: Use image node_id 2 for calling a global function with example usage: to_geo_json_geometry(label) and returns: _to_geo_collection, _to_multi_geo_collection, None, None, _to_geo_primitive