code: def prepare_description(
      stage: "Stage", max_length: int = MAX_TEXT_LENGTH
  ) -> str:
      desc = stage.short_description() or generate_description(stage)
      return truncate_text(desc, max_length)
  
imports: import argparse
  import logging
  from contextlib import contextmanager
  from itertools import chain, filterfalse
  from typing import TYPE_CHECKING, Dict, Iterable, List
  from dvc.cli import completion, formatter
  from dvc.cli.command import CmdBase
  from dvc.cli.utils import append_doc_link
  from dvc.log import logger
  from dvc.utils.cli_parse import parse_params
  from dvc.utils.humanize import truncate_text
label_desc: Use image node_id 2 for calling a global function with example usage: prepare_description(stage, max_length) and returns: truncate_text