code: def remove_item_from_yaml_file(filename: str, item_name: str) -> str:
      with open(filename) as f:
          file_contents = f.read()
          y = yaml.YAML(typ="safe", pure=True)
          data = y.load(file_contents)
  
          del data[item_name]
  
      # Create a temporary file that looks something like
      # ${TMPDIR}/single_axh4946j.yaml
      tmpFile = tempfile.NamedTemporaryFile(
          prefix=os.path.splitext(os.path.basename(filename))[0] + "_",
          suffix=".yaml",
          delete=False,
      )
  
      y.dump(data, tmpFile)
  
      return tmpFile.name
  
file_path: determined/e2e_tests/tests/experiment/test_noop_hpc.py
imports: import os
  import tempfile
  import time
  import pytest
  from determined.common import check, yaml
  from determined.common.api import bindings
  from tests import config
  from tests import experiment
label_desc: Use image node_id 2 for calling a global function with example usage: remove_item_from_yaml_file(filename, item_name) and returns: tmpFile