code: def thresholdcoloring(coloring, names):
      
      for key in coloring.keys():
          if len([k for k in coloring[key] if k in names]) == 0:
              coloring.pop(key)
          else:
              coloring[key] = utils.uniqify([k for k in coloring[key] if k in 
                                             names])
      return coloring
docs: Threshold a coloring dictionary for a given list of column names.
  
      Threshold `coloring` based on `names`, a list of strings in::
  
          coloring.values()
  
      **Parameters**
  
          **coloring** :  dictionary
  
              Hierarchical structure on the columns given in the header of the 
              file; an attribute of tabarrays.
  
              See :func:`tabular.tab.tabarray.__new__` for more information about 
              coloring.
  
          **names** :  list of strings
  
              List of strings giving column names.
  
      **Returns**
  
          **newcoloring** :  dictionary
  
              The thresholded coloring dictionary.