code: def _build_prompt(
      text: str,
      suffix: str,
      show_default: bool = False,
      default: t.Optional[t.Any] = None,
      show_choices: bool = True,
      type: t.Optional[ParamType] = None,
  ) -> str:
      prompt = text
      if type is not None and show_choices and isinstance(type, Choice):
          prompt += f" ({', '.join(map(str, type.choices))})"
      if default is not None and show_default:
          prompt = f"{prompt} [{_format_default(default)}]"
      return f"{prompt}{suffix}"
  
imports: import inspect
  import io
  import itertools
  import sys
  import typing
  from gettext import gettext
  from ._compat import isatty
  from ._compat import strip_ansi
  from .exceptions import Abort
  from .exceptions import UsageError
  from .globals import resolve_color_default
  from .types import Choice
  from .types import convert_type
  from .types import ParamType
  from .utils import echo
  from .utils import LazyFile
label_desc: Use image node_id 2 for calling a global function with example usage: _build_prompt(text, suffix, show_default, default, show_choices, type) and returns: prompt, suffix