code: def prepare_exp_id(kwargs) -> "RichText":
      exp_name = kwargs["Experiment"]
      rev = kwargs["rev"]
      typ = kwargs.get("typ", "baseline")
  
      if typ == "baseline" or not exp_name:
          text = ui.rich_text(exp_name or rev)
      else:
          text = ui.rich_text.assemble(
              rev, " [", (exp_name, "bold"), "]"
          )
  
      parent = kwargs.get("parent")
      suff = f" ({parent})" if parent else ""
      text.append(suff)
  
      tree = experiment_types[typ]
      pref = f"{tree} " if tree else ""
      return ui.rich_text(pref) + text
  
imports: import argparse
  import re
  from datetime import date, datetime
  from typing import TYPE_CHECKING, Dict, Iterable
  from funcy import lmap
  from dvc.cli import formatter
  from dvc.cli.command import CmdBase
  from dvc.cli.utils import append_doc_link
  from dvc.commands.metrics import DEFAULT_PRECISION
  from dvc.exceptions import DvcException
  from dvc.log import logger
  from dvc.ui import ui
  from dvc.utils.serialize import encode_exception
label_desc: Use image node_id 1 for calling a global function with example usage: prepare_exp_id(kwargs) and returns: unknown