code: def _basis_data_iter(fmt, reffmt, data_dir):
      '''Iterate over all basis set names, and return a tuple of
         (name, data) where data is the basis set in the given format
      '''
      md = api.get_metadata(data_dir)
      for bs, bs_md in md.items():
          versions = bs_md['versions'].keys()
  
          data = {}
          for v in versions:
              bsdata = api.get_basis(bs, fmt=fmt, version=v, data_dir=data_dir)
              refdata = api.get_references(bs, fmt=reffmt, version=v, data_dir=data_dir)
              data[v] = (bsdata, refdata)
  
          notes = api.get_basis_notes(bs, data_dir)
          yield (bs, data, notesf _basis_data_iter(fmt, reffmt, data_dir):
      '''Iterate over all basis set names, and return a tuple of
         (name, data) where data is the basis set in the given format
      '''
      md = api.get_metadata(data_dir)
      for bs, bs_md in md.items():
          versions = bs_md['versions'].keys()
  
          data = {}
          for v in versions:
              bsdata = api.get_basis(bs, fmt=fmt, version=v, data_dir=data_dir)
              refdata = api.get_references(bs, fmt=reffmt, version=v, data_dir=data_dir)
              data[v] = (bsdata, refdata)
  
          notes = api.get_basis_notes(bs, data_dir)
          yield (bs, data, notes)
docs: Iterate over all basis set names, and return a tuple of
         (name, data) where data is the basis set in the given format