code: def EllipsisTruncate(text, available_space, line_length):
      """Truncate text from the end with ellipsis."""
      if available_space < len(ELLIPSIS):
          available_space = line_length
      # No need to truncate
      if len(text) <= available_space:
          return text
      return text[: available_space - len(ELLIPSIS)] + ELLIPSIS
  
file_path: python-fire/fire/formatting.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from fire import formatting_windows
  import termcolor
label_desc: Use image node_id 7 for calling a global function with example usage: EllipsisTruncate(text, available_space, line_length) and returns: unknown, text