def _pad_keys_tabular(data, sort):
  """Pad only the key fields in data (i.e. the strs) in a tabular way, such that they
  all take the same amount of characters
  Args:
    data: list of tuples. The first member of the tuple must be str, the rest can be anything.
  Returns:
    list with the strs padded with space chars in order to align in tabular way
  """
  if sort:
    data  = sorted(data, key=lambda tup: tup[0])
  sizes = [len(t[0]) for t in data]
  pad   = max(sizes) + 2
  data  = [(t[0].ljust(pad), *t[1:]) for t in data]
  return data