code: def format_column(self, label, column):
          
          if len(column) == 0:
              val_width = 0
          else:
              val_width = max(len(self.format_value(v)) for v in column)
          val_width = min(val_width, self.max_width)
          width = max(val_width, len(str(label)), self.min_width, len(self.etc))
          def pad(value, label=False):
              if label:
                  raw = value
              else:
                  raw = self.format_value(value)
              if len(raw) > width:
                  prefix = raw[:width-len(self.etc)] + self.etc
              else:
                  prefix = raw
              return prefix.ljust(width)
          return pad
docs: Return a formatting function that pads & truncates values.