code: def coords(obj):
      """Yield all coordinate coordinate tuples from a geometry or feature.
      From python-geojson package."""
      if isinstance(obj, (tuple, list)):
          coordinates = obj
      elif "geometry" in obj:
          coordinates = obj["geometry"]["coordinates"]
      else:
          coordinates = obj.get("coordinates", obj)
      for e in coordinates:
          if isinstance(e, (float, int)):
              yield tuple(coordinates)
              break
          else:
              for f in coords(e):
                  yield f
  
file_path: rasterio/rasterio/rio/helpers.py
imports: import json
  import os
  import click
  from rasterio.errors import FileOverwriteError
label_desc: Use image node_id 1 for calling a global function with example usage: coords(obj) without return types