code: def dataset_walker(datasets):
      """Walk through *datasets* and their ancillary data.
  
      Yields datasets and their parent.
      """
      for dataset in datasets:
          yield dataset, None
          for anc_ds in dataset.attrs.get("ancillary_variables", []):
              try:
                  anc_ds.attrs
                  yield anc_ds, dataset
              except AttributeError:
                  continue
  
label_desc: Use image node_id 1 for calling a global function with example usage: dataset_walker(datasets) without return types