code: def down(db, dataset_name):
      match_d = {"name": dataset_name}
      dataset_dict = db.datasets.find_one(match_d)
  
      app_config = dataset_dict.get("app_config", None)
      if app_config is not None:
          app_config.pop("sidebar_mode", None)
  
          sidebar_groups = app_config.get("sidebar_groups", None)
          if sidebar_groups is not None:
              for sidebar_group in sidebar_groups:
                  sidebar_group.pop("expanded", None)
  
      for field in dataset_dict.get("sample_fields", []):
          _remove_metadata(field)
  
      for field in dataset_dict.get("frame_fields", []):
          _remove_metadata(field)
  
      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