code: def get_cli_path() -> str:
      """
      Get the location of the CLI.
  
      Default location is the directory containing the `cortex.binary` package.
      The location can be overridden by setting the `CORTEX_CLI_PATH` environment variable.
  
      Raises:
          Exception: Unable to find the CLI.
  
      Returns:
          str: The location of the CLI in the local filesystem.
      """
      if os.environ.get("CORTEX_CLI_PATH") is not None:
          cli_path = os.environ["CORTEX_CLI_PATH"]
          if not os.path.exists(cli_path):
              raise Exception(
                  f"unable to find cortex binary at {cli_path} as specified in `CORTEX_CLI_PATH` environment variable"
              )
          return cli_path
  
      try:
          import importlib.resources as pkg_resources
      except ImportError:
          # Try backported to PY<37 `importlib_resources`.
          import importlib_resources as pkg_resources
  
      from cortex import binary
  
      try:
          with pkg_resources.path(binary, "cli") as p:
              cli_path = p
      except FileNotFoundError as e:
          raise Exception(
              "unable to find cortex binary, please reinstall the cortex client by running `pip uninstall cortex` and then `pip install cortex`"
          ) from e
  
      return str(cli_path)
  
file_path: cortex/python/client/cortex/binary/__init__.py
imports: import os
  import subprocess
  import sys
  from typing import List
  from cortex.exceptions import CortexBinaryException
label_desc: Use image node_id 3 for calling a global function with example usage: get_cli_path() and returns: str, cli_path