code: def get_perimeter(
      query,
      radius=None,
      by_osmid=False,
      circle=False,
      dilate=None,
      rotation=0,
      **kwargs,
  ):
      if radius:
          # Perimeter is a circular or square shape
          perimeter = get_boundary(
              query, radius, circle=circle, rotation=rotation
          )
      else:
          # Perimeter is a OSM or user-provided polygon
          if parse_query(query) == "polygon":
              # Perimeter was already provided
              perimeter = query
          else:
              # Fetch perimeter from OSM
              perimeter = ox.geocode_to_gdf(
                  query,
                  by_osmid=by_osmid,
                  **kwargs,
              )
  
      # Apply dilation
      perimeter = ox.project_gdf(perimeter)
      if dilate is not None:
          perimeter.geometry = perimeter.geometry.buffer(dilate)
      perimeter = perimeter.to_crs(4326)
  
      return perimeter
  
file_path: prettymaps/prettymaps/fetch.py
imports: import re
  import warnings
  import numpy
  import osmnx
  from copy import deepcopy
  from shapely.geometry import box, Point, Polygon, MultiPolygon, LineString, MultiLineString
  from geopandas import GeoDataFrame
  from shapely.affinity import rotate
  from shapely.ops import unary_union
  from shapely.errors import ShapelyDeprecationWarning
label_desc: Use image node_id 3 for calling a global function with example usage: get_perimeter(query, radius, by_osmid, circle, dilate, rotation) and returns: perimeter