code: def get_place_coords(
      place_type: str,
      latitude: float,
      longitude: float,
      search_radius_km: int,
      keyfn: Path,
  ) -> pandas.DataFrame:
      """
      Get places using Google Maps Places API
      Requires you to have a Google Cloud account with API key.
      """
  
      keyfn = Path(keyfn).expanduser()
      key = keyfn.read_text()
  
      stub = URL + f"location={latitude},{longitude}"
  
      stub += f"&radius={search_radius_km * 1000}"
  
      stub += f"&types={place_type}"
  
      stub += f"&key={key}"
  
      r = requests.get(stub)
      r.raise_for_status()
  
      place_json = r.json()["results"]
  
      places = pandas.DataFrame(
          index=[p["name"] for p in place_json],
          columns=["latitude", "longitude", "distance_km", "vicinity"],
      )
      places["latitude"] = [
          p["geometry"]["location"]["lat"] for p in place_json
      ]
      places["longitude"] = [
          p["geometry"]["location"]["lng"] for p in place_json
      ]
      places["vicinity"] = [p["vicinity"] for p in place_json]
  
      return places
  
imports: import functools
  from argparse import ArgumentParser
  from pathlib import Path
  import pandas
  import requests
  from pymap3d.vincenty import vdist
label_desc: Use image node_id 1 for calling a global function with example usage: get_place_coords(place_type, latitude, longitude, search_radius_km, keyfn) and returns: places