def _TextJustify(self, text, col_size):
    """Formats text within column with white space padding.

    A single space is prefixed, and a number of spaces are added as a
    suffix such that the length of the resultant string equals the col_size.

    If the length of the text exceeds the column width available then it
    is split into words and returned as a list of string, each string
    contains one or more words padded to the column size.

    Args:
      text: String of text to format.
      col_size: integer size of column to pad out the text to.

    Returns:
      List of strings col_size in length.

    Raises:
      TableError: If col_size is too small to fit the words in the text.
    """
    result = []
    if '\n' in text:
      for paragraph in text.split('\n'):
        result.extend(self._TextJustify(paragraph, col_size))
      return result

    wrapper = textwrap.TextWrapper(width=col_size-2, break_long_words=False,
                                   expand_tabs=False)
    try:
      text_list = wrapper.wrap(text)
    except ValueError:
      raise TableError('Field too small (minimum width: 3)')

    if not text_list:
      return [' '*col_size]

    for current_line in text_list:
      stripped_len = len(terminal.StripAnsiText(current_line))
      ansi_color_adds = len(current_line) / stripped_len
      # +2 for white space on either side.
      if stripped_len + 2 > col_size:
        raise TableError('String contains words that do not fit in column.')

      result.append(' %-*s' % (col_size - 1 + ansi_color_adds, current_line))

    return result
dataset/ETHPy150Open google/textfsm/texttable.py/TextTable._TextJustify/operator `-` -> `/`