code: def down(db, dataset_name):
      match_d = {"name": dataset_name}
      dataset_dict = db.datasets.find_one(match_d)
  
      runs = dataset_dict.pop("runs", None)
  
      if runs:
          for _id in runs.values():
              db.runs.delete_one({"_id": _id})
  
      app_config = dataset_dict.get("app_config", None)
      if app_config:
          color_scheme = app_config.get("color_scheme", None)
          if color_scheme:
              # Remove fields added in the newer version
              keys_to_remove = [
                  "_id",
                  "color_by",
                  "colorscales",
                  "default_mask_targets_colors",
                  "default_colorscale",
                  "label_tags",
                  "multicolor_keypoints",
                  "opacity",
                  "show_skeletons",
              ]
              for key in keys_to_remove:
                  color_scheme.pop(key, None)
  
              # Handle nested fields within 'fields'
              fields = color_scheme.get("fields", [])
              if fields:
                  for field in fields:
                      if field is not None:
                          field.pop("maskTargetsColors", None)
  
      db.datasets.replace_one(match_d, dataset_dict)
  
label_desc: Use image node_id 2 for calling a global function with example usage: down(db, dataset_name) without return types