code: def _down_runs(db, dataset_dict, runs_field):
      if runs_field not in dataset_dict:
          return
  
      runs = dataset_dict[runs_field]
  
      _runs = {}
      for key, _id in runs.items():
          if isinstance(_id, ObjectId):
              try:
                  run_doc = db.runs.find_one({"_id": _id})
              except:
                  continue
  
              db.runs.delete_one({"_id": _id})
              run_doc.pop("_id", None)
              run_doc.pop("_dataset_id", None)
              _runs[key] = run_doc
          else:
              # Assume already migrated
              _runs[key] = _id
  
      dataset_dict[runs_field] = _runs
  
file_path: fiftyone/fiftyone/migrations/revisions/v0_19_0.py
imports: from datetime import datetime
  import logging
  import string
  from bson import ObjectId
label_desc: Use image node_id 5 for calling a global function with example usage: _down_runs(db, dataset_dict, runs_field) without return types