parameters: (
      head: List[Sequence[str]], tail: List[Sequence[str]]
  )
return_statement: return head, tail
docstring: Justify items in head and tail, so they are right-aligned when stacked.
  
      Parameters
      ----------
      head : list-like of list-likes of strings
      tail : list-like of list-likes of strings
  
      Returns
      -------
      tuple of list of tuples of strings
          Same as head and tail, but items are right aligned when stacked
          vertically.
  
      Examples
      --------
      >>> _justify([['a', 'b']], [['abc', 'abcd']])
      ([('  a', '   b')], [('abc', 'abcd')])
docstring_summary: Justify items in head and tail, so they are right-aligned when stacked.
docstring_tokens: Justify items in head and tail so they are right - aligned when stacked .
function: def _justify(
      head: List[Sequence[str]], tail: List[Sequence[str]]
  ) -> Tuple[List[Tuple[str, ...]], List[Tuple[str, ...]]]:
      """
      Justify items in head and tail, so they are right-aligned when stacked.
  
      Parameters
      ----------
      head : list-like of list-likes of strings
      tail : list-like of list-likes of strings
  
      Returns
      -------
      tuple of list of tuples of strings
          Same as head and tail, but items are right aligned when stacked
          vertically.
  
      Examples
      --------
      >>> _justify([['a', 'b']], [['abc', 'abcd']])
      ([('  a', '   b')], [('abc', 'abcd')])
      """
      combined = head + tail
  
      # For each position for the sequences in ``combined``,
      # find the length of the largest string.
      max_length = [0] * len(combined[0])
      for inner_seq in combined:
          length = [len(item) for item in inner_seq]
          max_length = [max(x, y) for x, y in zip(max_length, length)]
  
      # justify each item in each list-like in head and tail using max_length
      head = [
          tuple(x.rjust(max_len) for x, max_len in zip(seq, max_length)) for seq in head
      ]
      tail = [
          tuple(x.rjust(max_len) for x, max_len in zip(seq, max_length)) for seq in tail
      ]
      # https://github.com/python/mypy/issues/4975
      # error: Incompatible return value type (got "Tuple[List[Sequence[str]],
      #  List[Sequence[str]]]", expected "Tuple[List[Tuple[str, ...]],
      #  List[Tuple[str, ...]]]")
      return head, tail
function_tokens: def _justify ( head : List [ Sequence [ str ] ] , tail : List [ Sequence [ str ] ] ) -> Tuple [ List [ Tuple [ str , ... ] ] , List [ Tuple [ str , ... ] ] ] : combined = head + tail # For each position for the sequences in ``combined``, # find the length of the largest string. max_length = [ 0 ] * len ( combined [ 0 ] ) for inner_seq in combined : length = [ len ( item ) for item in inner_seq ] max_length = [ max ( x , y ) for x , y in zip ( max_length , length ) ] # justify each item in each list-like in head and tail using max_length head = [ tuple ( x . rjust ( max_len ) for x , max_len in zip ( seq , max_length ) ) for seq in head ] tail = [ tuple ( x . rjust ( max_len ) for x , max_len in zip ( seq , max_length ) ) for seq in tail ] # https://github.com/python/mypy/issues/4975 # error: Incompatible return value type (got "Tuple[List[Sequence[str]], #  List[Sequence[str]]]", expected "Tuple[List[Tuple[str, ...]], #  List[Tuple[str, ...]]]") return head , tail