code: def maybe_set_template(
      template_name: str, template_file: str
  ) -> subprocess.CompletedProcess:
      command = [
          "det",
          "-m",
          conf.make_master_url(),
          "template",
          "set",
          template_name,
          os.path.join(os.path.dirname(__file__), template_file),
      ]
      return subprocess.run(
          command, universal_newlines=True, stdout=subprocess.PIPE
      )
  
file_path: determined/e2e_tests/tests/template/template.py
imports: import os
  import re
  import subprocess
  from tests import config
label_desc: Use image node_id 2 for calling a global function with example usage: maybe_set_template(template_name, template_file) and returns: subprocess