code: def to_mapping(obj):
      mapping = getattr(obj, GEO_INTERFACE_MARKER, None)
  
      if mapping is not None:
          return mapping
  
      if is_mapping(obj):
          return obj
  
      if isinstance(obj, geojson.GeoJSON):
          return dict(obj)
  
      return json.loads(json.dumps(obj))
  
label_desc: Use image node_id 2 for calling a global function with example usage: to_mapping(obj) and returns: json, mapping, obj, dict