code: def get_step(
      test: Test,
      test_collection_file: List[str] = None,
      run_id: int = 1,
      report: bool = False,
      smoke_test: bool = False,
      env: Optional[Dict] = None,
      priority_val: int = 0,
      global_config: Optional[str] = None,
  ):
      env = env or {}
  
      step = copy.deepcopy(DEFAULT_STEP_TEMPLATE)
  
      cmd = ["./release/run_release_test.sh", test["name"]]
  
      for file in test_collection_file or []:
          cmd += ["--test-collection-file", file]
  
      if global_config:
          cmd += ["--global-config", global_config]
  
      if report and not bool(
          int(os.environ.get("NO_REPORT_OVERRIDE", "0"))
      ):
          cmd += ["--report"]
  
      if smoke_test:
          cmd += ["--smoke-test"]
  
      step["plugins"][0][DOCKER_PLUGIN_KEY]["command"] = cmd
  
      env_to_use = test.get("env", DEFAULT_ENVIRONMENT)
      env_dict = load_environment(env_to_use)
      env_dict.update(env)
  
      step["env"].update(env_dict)
      step["plugins"][0][DOCKER_PLUGIN_KEY]["image"] = "python:3.9"
  
      commit = get_test_env_var("RAY_COMMIT")
      branch = get_test_env_var("RAY_BRANCH")
      label = commit[:7] if commit else branch
  
      if smoke_test:
          concurrency_test = as_smoke_test(test)
      else:
          concurrency_test = test
      concurrency_group, concurrency_limit = get_concurrency_group(
          concurrency_test
      )
  
      step["concurrency_group"] = concurrency_group
      step["concurrency"] = concurrency_limit
  
      step["priority"] = priority_val
  
      # Set queue to QUEUE_CLIENT for client tests
      # (otherwise keep default QUEUE_DEFAULT)
      if test.get("run", {}).get("type") == "client":
          step["agents"]["queue"] = str(RELEASE_QUEUE_CLIENT)
  
      # If a test is not stable, allow to soft fail
      stable = test.get("stable", True)
      clone_test = copy.deepcopy(
          test
      )  # avoid modifying the original test
      clone_test.update_from_s3()
      jailed = clone_test.get_state() == TestState.JAILED
      full_label = ""
      if not stable:
          step["soft_fail"] = True
      if not stable:
          full_label += "[unstable]"
      if jailed:
          full_label += "[jailed]"
  
      full_label += test["name"]
      if smoke_test:
          full_label += " [smoke test] "
      full_label += f" ({label}) ({run_id})"
  
      step["label"] = full_label
  
      return step
  
file_path: ray/release/ray_release/buildkite/step.py
imports: import copy
  import os
  from typing import Any, Dict, Optional, List
  from ray_release.aws import RELEASE_AWS_BUCKET
  from ray_release.buildkite.concurrency import get_concurrency_group
  from ray_release.test import Test, TestState
  from ray_release.config import DEFAULT_ANYSCALE_PROJECT, DEFAULT_CLOUD_ID, as_smoke_test
  from ray_release.env import DEFAULT_ENVIRONMENT, load_environment
  from ray_release.template import get_test_env_var
  from ray_release.util import DeferredEnvVar
label_desc: Use image node_id 1 for calling a global function with example usage: get_step(test, test_collection_file, run_id, report, smoke_test, env, priority_val, global_config) and returns: step