code: def _check_helper(cname, template, docker_cmd):
      return " ".join(
          [
              docker_cmd,
              "inspect",
              "-f",
              "'{{" + template + "}}'",
              cname,
              "||",
              "true",
          ]
      )
  
file_path: ray/python/ray/autoscaler/_private/docker.py
imports: from pathlib import Path
  from typing import Any, Dict
  from ray.autoscaler._private.cli_logger import cli_logger
label_desc: Use image node_id 4 for calling a global function with example usage: _check_helper(cname, template, docker_cmd) and returns: str