code: def up(db, dataset_name):
      match_d = {"name": dataset_name}
      dataset_dict = db.datasets.find_one(match_d)
  
      sample_fields = dataset_dict.get("sample_fields", [])
  
      for field in sample_fields:
          if "db_field" not in field:
              if field["name"] == "id":
                  field["db_field"] = "_id"
              else:
                  field["db_field"] = field["name"]
  
      if not _has_field("id", sample_fields):
          sample_fields.insert(
              0,
              {
                  "name": "id",
                  "ftype": "fiftyone.core.fields.ObjectIdField",
                  "subfield": None,
                  "embedded_doc_type": None,
                  "db_field": "_id",
              },
          )
  
      dataset_dict["sample_fields"] = sample_fields
  
      frame_fields = dataset_dict.get("frame_fields", [])
  
      for field in frame_fields:
          if "db_field" not in field:
              if field["name"] == "id":
                  field["db_field"] = "_id"
              else:
                  field["db_field"] = field["name"]
  
      if not _has_field("id", frame_fields):
          frame_fields.insert(
              0,
              {
                  "name": "id",
                  "ftype": "fiftyone.core.fields.ObjectIdField",
                  "subfield": None,
                  "embedded_doc_type": None,
                  "db_field": "_id",
              },
          )
  
      if not _has_field("frame_number", frame_fields):
          frame_fields.insert(
              1,
              {
                  "name": "frame_number",
                  "ftype": "fiftyone.core.fields.FrameNumberField",
                  "subfield": None,
                  "embedded_doc_type": None,
                  "db_field": "frame_number",
              },
          )
  
      if not _has_field("_sample_id", frame_fields):
          frame_fields.insert(
              2,
              {
                  "name": "_sample_id",
                  "ftype": "fiftyone.core.fields.ObjectIdField",
                  "subfield": None,
                  "embedded_doc_type": None,
                  "db_field": "_sample_id",
              },
          )
  
      dataset_dict["frame_fields"] = frame_fields
  
      db.datasets.replace_one(match_d, dataset_dict)
  
label_desc: Use image node_id 1 for calling a global function with example usage: up(db, dataset_name) without return types