code: def get_configuration(
      model_name: str,
      env: Optional[Dict[str, str]] = None,
      quantize: Optional[str] = None,
      dtype: Optional[str] = None,
  ) -> Tuple[List[str], str, int, Optional[Dict[str, str]]]:
      # TODO: Support secrets
      # Validating environment variables
      if not env:
          env = {}
      if (
          "HUGGING_FACE_HUB_TOKEN" not in env
          and "HUGGING_FACE_HUB_TOKEN" in os.environ
      ):
          env["HUGGING_FACE_HUB_TOKEN"] = os.environ[
              "HUGGING_FACE_HUB_TOKEN"
          ]
      if quantize and quantize not in [
          "awq",
          "eetq",
          "gptq",
          "bitsandbytes",
      ]:
          raise ValueError(
              "The quantize argument can be one of the following: 'awq', 'eetq', 'gptq', or 'bitsandbytes'."
          )
      env["MODEL_ID"] = model_name
      launcher_command = f"text-generation-launcher --hostname 0.0.0.0 --port 80 --trust-remote-code"
      if quantize:
          launcher_command += f" --quantize {quantize}"
      if dtype:
          launcher_command += f" --dtype {dtype}"
      image = "ghcr.io/huggingface/text-generation-inference"
      port = 80
      return [launcher_command], image, port, env or None
  
file_path: dstack/src/dstack/api/_public/huggingface/completions/__init__.py
imports: import os
  from typing import Dict, List, Optional, Tuple
  from dstack._internal.core.models.configurations import ServiceConfiguration, TaskConfiguration
label_desc: Use image node_id 1 for calling a global function with example usage: get_configuration(model_name, env, quantize, dtype) and returns: list,  image,  port,  unknown