docs: def get_longitude_variables(nc):
      '''
      Returns a list of all variables matching definitions for longitude
  
      :param netcdf4.dataset nc: an open netcdf dataset object
      '''
      longitude_variables = []
      # standard_name takes precedence
      for variable in nc.get_variables_by_attributes(standard_name="longitude"):
          longitude_variables.append(variable.name)
  
      # Then axis
      for variable in nc.get_variables_by_attributes(axis='X'):
          if variable.name not in longitude_variables:
              longitude_variables.append(variable.name)
  
      check_fn = partial(attr_membership, value_set=VALID_LON_UNITS,
                         modifier_fn=lambda s: s.lower())
      for variable in nc.get_variables_by_attributes(units=check_fn):
          if variable.name not in longitude_variables:
              longitude_variables.append(variable.name)
  
      return longitude_variables