code: def create_conda_lock_file(build_metadata):
      build_name = build_metadata["name"]
      folder_path = Path(build_metadata["folder"])
      environment_path = folder_path / f"{build_name}_environment.yml"
      platform = build_metadata["platform"]
      lock_file_basename = build_name
      if not lock_file_basename.endswith(platform):
          lock_file_basename = f"{lock_file_basename}_{platform}"
  
      lock_file_path = folder_path / f"{lock_file_basename}_conda.lock"
      conda_lock(environment_path, lock_file_path, platform)
  
imports: import json
  import logging
  import re
  import shlex
  import subprocess
  import sys
  from importlib.metadata import version
  from pathlib import Path
  import click
  from jinja2 import Environment
  from packaging.version import Version
label_desc: Use image node_id 8 for calling a global function with example usage: create_conda_lock_file(build_metadata) without return types