code: def gpus_cmd():
      n_gpus = get_ngpus_vis()
      if n_gpus == 1:
          return [
              "--gpus",
              "device=%d" % int(os.getenv("CUDA_VISIBLE_DEVICES", "0")),
          ]
      elif n_gpus > 2:
          # note below if joined loses ' needed
          return [
              "--gpus",
              '"device=%s"'
              % os.getenv(
                  "CUDA_VISIBLE_DEVICES",
                  str(list(range(0, n_gpus)))
                  .replace("]", "")
                  .replace("[", "")
                  .replace(" ", ""),
              ),
          ]
  
imports: import os
  import subprocess
  import time
  from datetime import datetime
  import pytest
  from src.utils import get_ngpus_vis, makedirs
  from tests.utils import wrap_test_forked, get_inf_port, get_inf_server
  from tests.test_langchain_units import have_openai_key, have_replicate_key
  from src.client_test import run_client_many, test_client_basic_api_lean
  from src.enums import PromptType, LangChainAction
label_desc: Use image node_id 3 for calling a global function with example usage: gpus_cmd() and returns: list, list