code: def _prepare_geocode_result(results):
      """
      Helper function for the geocode function
  
      Takes a dict where keys are index entries, values are tuples containing:
      (address, (lat, lon))
  
      """
      # Prepare the data for the DataFrame as a dict of lists
      d = defaultdict(list)
      index = []
  
      for i, s in results.items():
          if s is None:
              p = Point()
              address = None
  
          else:
              address, loc = s
  
              # loc is lat, lon and we want lon, lat
              if loc is None:
                  p = Point()
              else:
                  p = Point(loc[1], loc[0])
  
          d["geometry"].append(p)
          d["address"].append(address)
          index.append(i)
  
      df = geopandas.GeoDataFrame(d, index=index, crs="EPSG:4326")
  
      return df
  
file_path: geopandas/geopandas/tools/geocoding.py
imports: from collections import defaultdict
  import time
  import pandas
  from shapely.geometry import Point
  import geopandas
label_desc: Use image node_id 5 for calling a global function with example usage: _prepare_geocode_result(results) and returns: df