docs: def _find_metadata_vars(self, ds, refresh=False):
          '''
          Returns a list of netCDF variable instances for those that are likely metadata variables
  
          :param netCDF4.Dataset ds: An open netCDF dataset
          :param bool refresh: if refresh is set to True, the cache is
                               invalidated.
          :rtype: list
          :return:   List of variable names (str) that are likely metadata
                     variable candidates.
  
          '''
          if self._metadata_vars.get(ds, None) and refresh is False:
              return self._metadata_vars[ds]
  
          self._metadata_vars[ds] = []
          for name, var in ds.variables.items():
  
              if name in self._find_ancillary_vars(ds) or name in self._find_coord_vars(ds):
                  continue
  
              if name in ('platform_name', 'station_name', 'instrument_name', 'station_id', 'platform_id', 'surface_altitude'):
                  self._metadata_vars[ds].append(name)
  
              elif getattr(var, 'cf_role', '') != '':
                  self._metadata_vars[ds].append(name)
  
              elif getattr(var, 'standard_name', None) is None and len(var.dimensions) == 0:
                  self._metadata_vars[ds].append(name)
  
          return self._metadata_vars[ds]