code: def auto_complete_binding(
      available_calls: List[str], fn_name: str
  ) -> str:
      """
      utility to allow partial matching of binding names.
      """
      if fn_name in available_calls:
          return fn_name
      simplified_name = re.sub(r"[^a-zA-Z]", "", fn_name)
      matches = [
          n
          for n in available_calls
          if re.match(
              f".*({fn_name}|{simplified_name}).*", n, re.IGNORECASE
          )
      ]
      if not matches:
          raise errors.CliError(f"no such binding found: {fn_name}")
      if not sys.stdout.isatty():
          raise errors.CliError(
              f"no exact matches for '{fn_name}'. Did you mean:"
              + "\n{}".format("\n".join(matches))
          )
      indexed_matches = [
          f"{idx}: {match}" for idx, match in list(enumerate(matches))
      ]
      selected_idx = (
          input(
              f"{len(matches)} call(s) matched '{fn_name}'."
              + " Pick one by index.\n"
              + "\n".join(indexed_matches)
              + "\n"
          )
          or "0"
      )
      fn_name = matches[int(selected_idx.strip())]
      return fn_name
  
imports: import argparse
  import collections
  import inspect
  import json
  import re
  import shlex
  import shutil
  import subprocess
  import sys
  from argparse import Namespace
  from collections.abc import Sequence
  from typing import Any, Dict, List, OrderedDict, Tuple
  from urllib import parse
  from termcolor import colored
  import determined.cli.render
  from determined import cli
  from determined.cli import errors
  from determined.common.api import authentication, bindings
  from determined.common.api import errors
  from determined.common.api import request
  from determined.common.declarative_argparse import Arg, Cmd
label_desc: Use image node_id 13 for calling a global function with example usage: auto_complete_binding(available_calls, fn_name) and returns: fn_name, fn_name