docs: def check_convention_possibly_var_attrs(self, ds):
          """
          Check variable and global attributes are strings for recommended attributes under CF §2.6.2
  
          CF §2.6.2 institution, source, references, and comment, either global
          or assigned to individual variables.  When an attribute appears both
          globally and as a variable attribute, the variable's version has
          precedence.  Must be strings.
  
          :param netCDF4.Dataset ds: An open netCDF dataset
          :rtype: list
          :return: List of Results
          """
          # The attrs are optional and only needs to be a string and non-empty if it
          # exists.
          attrs = ['institution', 'source', 'references', 'comment']
  
          valid_attributes = TestCtx(BaseCheck.MEDIUM, self.section_titles['2.6'])
  
          attr_bin = set()
          # If the attribute is defined for any variable, check it and mark in
          # the set that we've seen it at least once.
          for name, variable in ds.variables.items():
              for attribute in variable.ncattrs():
                  varattr = getattr(variable, attribute)
                  if attribute in attrs:
                      is_string = isinstance(varattr, basestring)
                      valid_attributes.assert_true(is_string and len(varattr) > 0,
                                                   "§2.6.2 {}:{} should be a non-empty string"
                                                   "".format(name, attribute))
                      attr_bin.add(attribute)
  
          # Check all the global attributes too and mark if we've seen them
          for attribute in ds.ncattrs():
              dsattr = getattr(ds, attribute)
              if attribute in attrs:
                  is_string = isinstance(dsattr, basestring)
                  valid_attributes.assert_true(is_string and len(dsattr) > 0,
                                               "§2.6.2 {} global attribute should be a non-empty string"
                                               "".format(attribute))
                  attr_bin.add(attribute)
          return valid_attributes.to_result()