code: def dataset_walker(datasets):
      
      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
docs: Walk through *datasets* and their ancillary data.
  
      Yields datasets and their parent.