code: def replace_anc(dataset, parent_dataset):
      """Replace *dataset* the *parent_dataset*'s `ancillary_variables` field."""
      if parent_dataset is None:
          return
      id_keys = parent_dataset.attrs.get(
          "_satpy_id_keys",
          dataset.attrs.get("_satpy_id_keys", default_id_keys_config),
      )
      current_dataid = DataID(id_keys, **dataset.attrs)
      for idx, ds in enumerate(
          parent_dataset.attrs["ancillary_variables"]
      ):
          if current_dataid == DataID(id_keys, **ds.attrs):
              parent_dataset.attrs["ancillary_variables"][idx] = dataset
              return
  
label_desc: Use image node_id 2 for calling a global function with example usage: replace_anc(dataset, parent_dataset) without return types