code: def up(
      cluster_config_file,
      min_workers,
      max_workers,
      no_restart,
      restart_only,
      yes,
      cluster_name,
      no_config_cache,
      redirect_command_output,
      use_login_shells,
      disable_usage_stats,
  ):
      """Create or update a Ray cluster."""
      if disable_usage_stats:
          usage_lib.set_usage_stats_enabled_via_env_var(False)
  
      if restart_only or no_restart:
          cli_logger.doassert(
              restart_only != no_restart,
              "`{}` is incompatible with `{}`.",
              cf.bold("--restart-only"),
              cf.bold("--no-restart"),
          )
          assert (
              restart_only != no_restart
          ), "Cannot set both 'restart_only' and 'no_restart' at the same time!"
  
      if urllib.parse.urlparse(cluster_config_file).scheme in (
          "http",
          "https",
      ):
          try:
              response = urllib.request.urlopen(
                  cluster_config_file, timeout=5
              )
              content = response.read()
              file_name = cluster_config_file.split("/")[-1]
              with open(file_name, "wb") as f:
                  f.write(content)
              cluster_config_file = file_name
          except urllib.error.HTTPError as e:
              cli_logger.warning("{}", str(e))
              cli_logger.warning(
                  "Could not download remote cluster configuration file."
              )
      create_or_update_cluster(
          config_file=cluster_config_file,
          override_min_workers=min_workers,
          override_max_workers=max_workers,
          no_restart=no_restart,
          restart_only=restart_only,
          yes=yes,
          override_cluster_name=cluster_name,
          no_config_cache=no_config_cache,
          redirect_command_output=redirect_command_output,
          use_login_shells=use_login_shells,
      )
  
imports: import copy
  import json
  import logging
  import os
  import platform
  import signal
  import subprocess
  import sys
  import time
  import traceback
  import urllib
  import urllib.parse
  import warnings
  import shutil
  from datetime import datetime
  from typing import Optional, Set, List, Tuple
  import click
  import psutil
  import yaml
  import ray
  import ray._private.ray_constants
  import ray._private.services
  from ray._private.utils import check_ray_client_dependencies_installed, parse_resources_json, parse_node_labels_json
  from ray._private.internal_api import memory_summary
  from ray._private.storage import _load_class
  from ray._private.usage import usage_lib
  from ray.autoscaler._private.cli_logger import add_click_logging_options, cf, cli_logger
  from ray.autoscaler._private.commands import RUN_ENV_TYPES, attach_cluster, create_or_update_cluster, debug_status, exec_cluster, get_cluster_dump_archive, get_head_node_ip, get_local_dump_archive, get_worker_node_ips, kill_node, monitor_cluster, rsync, teardown_cluster
  from ray.autoscaler._private.constants import RAY_PROCESSES
  from ray.autoscaler._private.fake_multi_node.node_provider import FAKE_HEAD_NODE_ID
  from ray.util.annotations import PublicAPI
label_desc: Use image node_id 8 for calling a global function with example usage: up(cluster_config_file, min_workers, max_workers, no_restart, restart_only, yes, cluster_name, no_config_cache, redirect_command_output, use_login_shells, disable_usage_stats) without return types