code: def conda_env_yml():
      """Write conda yml file needed for tests"""
  
      conda_yml_file_name = "conda_env.yml"
      with open(
          os.path.join(os.getcwd(), "VERSION"), "r"
      ) as version_file:
          sagemaker_version = version_file.readline().strip()
      conda_file_path = os.path.join(os.getcwd(), conda_yml_file_name)
      with open(conda_file_path, "w") as yml_file:
          yml_file.writelines(
              CONDA_YML_FILE_TEMPLATE.format(
                  sagemaker_version=sagemaker_version
              )
          )
      yield conda_file_path
  
      # cleanup
      if os.path.isfile(conda_yml_file_name):
          os.remove(conda_yml_file_name)
  
imports: from __future__ import absolute_import
  import base64
  import os
  import subprocess
  import shutil
  import pytest
  import docker
  import re
  import sys
  from docker.errors import BuildError
  from sagemaker.utils import sagemaker_timestamp, _tmpdir, sts_regional_endpoint
label_desc: Use image node_id 9 for calling a global function with example usage: conda_env_yml() without return types