code: def down(db, dataset_name):
      match_d = {"name": dataset_name}
      dataset_dict = db.datasets.find_one(match_d)
  
      group_field = dataset_dict.pop("group_field", None)
      group_media_types = dataset_dict.pop("group_media_types", None)
      default_group_slice = dataset_dict.pop(
          "default_group_slice", None
      )
  
      if group_field or group_media_types or default_group_slice:
          raise ValueError(
              "Cannot migrate dataset '%s' below v0.17.0 because groups were "
              "not supported before this release" % dataset_name
          )
  
      app_config = dataset_dict.pop("app_config", None)
  
      if app_config is not None and "sidebar_groups" in app_config:
          dataset_dict["app_sidebar_groups"] = app_config[
              "sidebar_groups"
          ]
  
      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