code: def new_client(
      env_name: str,
      operator_endpoint: str,
  ) -> Client:
      """
      Create a new environment to connect to an existing cluster, and initialize a client to deploy and manage APIs on that cluster.
  
      Args:
          env_name: Name of the environment to create.
          operator_endpoint: The endpoint for the operator of your Cortex cluster. You can get this endpoint by running the CLI command `cortex cluster info`.
  
      Returns:
          Cortex client that can be used to deploy and manage APIs on a cluster.
      """
      cli_args = [
          "env",
          "configure",
          env_name,
          "--operator-endpoint",
          operator_endpoint,
      ]
  
      run_cli(cli_args, hide_output=True)
  
      return client(env_name)
  
file_path: cortex/python/client/cortex/__init__.py
imports: import json
  from typing import Optional, List
  from cortex.binary import run_cli
  from cortex.client import Client
  from cortex.exceptions import NotFound
  from cortex.telemetry import sentry_wrapper
label_desc: Use image node_id 2 for calling a global function with example usage: new_client(env_name, operator_endpoint) and returns: client