code: def make_default_short_help(help, max_length=45):
      """Return a condensed version of help string."""
      words = help.split()
      total_length = 0
      result = []
      done = False
  
      for word in words:
          if word[-1:] == ".":
              done = True
          new_length = 1 + len(word) if result else len(word)
          if total_length + new_length > max_length:
              result.append("...")
              done = True
          else:
              if result:
                  result.append(" ")
              result.append(word)
          if done:
              break
          total_length += new_length
  
      return "".join(result)
  
imports: import os
  import sys
  from ._compat import _default_text_stderr
  from ._compat import _default_text_stdout
  from ._compat import auto_wrap_for_ansi
  from ._compat import binary_streams
  from ._compat import filename_to_ui
  from ._compat import get_filesystem_encoding
  from ._compat import get_streerror
  from ._compat import is_bytes
  from ._compat import open_stream
  from ._compat import PY2
  from ._compat import should_strip_ansi
  from ._compat import string_types
  from ._compat import strip_ansi
  from ._compat import text_streams
  from ._compat import text_type
  from ._compat import WIN
  from .globals import resolve_color_default
label_desc: Use image node_id 4 for calling a global function with example usage: make_default_short_help(help, max_length) and returns: str