code: def get_unique_match(table, colname, value):
      
      # FIXME, This is here for python 3.5, where astropy is now returning bytes
      # instead of str
      if table[colname].dtype.kind in ['S', 'U']:
          mask = table[colname].astype(str) == value
      else:
          mask = table[colname] == value
  
      if mask.sum() != 1:
          raise KeyError("%i rows in column %s match value %s" %
                         (mask.sum(), colname, value))
      return np.argmax(mask)
docs: Get the row matching value for a particular column.
      If exactly one row matchs, return index of that row,
      Otherwise raise KeyError.