code: def generate_description(stage: "Stage") -> str:
      def part_desc(outs: Iterable["Output"]) -> str:
          return ", ".join(out.def_path for out in outs)
  
      if not stage.deps and not stage.outs:
          return "No outputs or dependencies"
  
      if not stage.outs and stage.deps:
          return "Depends on " + part_desc(stage.deps)
  
      def is_plot_or_metric(out: "Output"):
          return bool(out.plot) or bool(out.metric)
  
      desc: List[str] = []
  
      outs = list(filterfalse(is_plot_or_metric, stage.outs))
      if outs:
          desc.append("Outputs " + part_desc(outs))
  
      plots_and_metrics = list(filter(is_plot_or_metric, stage.outs))
      if plots_and_metrics:
          desc.append("Reports " + part_desc(plots_and_metrics))
  
      return "; ".join(desc)
  
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 1 for calling a global function with example usage: generate_description(stage) and returns: str, str, str, unknown, unknown