docs: def _check_valid_udunits(self, ds, variable_name):
          '''
          Checks that the variable's units are contained in UDUnits
  
          :param netCDF4.Dataset ds: An open netCDF dataset
          :param str variable_name: Name of the variable to be checked
          '''
          variable = ds.variables[variable_name]
  
          units = getattr(variable, 'units', None)
          standard_name = getattr(variable, 'standard_name', None)
          standard_name, standard_name_modifier = self._split_standard_name(standard_name)
          std_name_units_dimensionless = cfutil.is_dimensionless_standard_name(self._std_names._root,
                                                                 standard_name)
  
          # If the variable is supposed to be dimensionless, it automatically passes
          should_be_dimensionless = (variable.dtype.char == 'S' or
                                     std_name_units_dimensionless)
  
          valid_udunits = TestCtx(BaseCheck.HIGH, self.section_titles["3.1"])
          are_udunits = (units is not None and util.units_known(units))
          valid_udunits.assert_true(should_be_dimensionless or are_udunits,
                                    'units for {}, "{}" are not recognized by UDUNITS'.format(variable_name, units))
          return valid_udunits.to_result()