code: def build(
      dockerfile: str,
      tagname: str,
      python_version: str,
      workdir: str,
      install_cmd: str,
  ):
      cmd = [
          "docker",
          "build",
          "-f",
          dockerfile,
          "--build-arg",
          f"PYTHON_VERSION={python_version}",
          "--build-arg",
          f"WORKDIR={workdir}",
          "--build-arg",
          f"INSTALL_CMD={install_cmd}",
          "-t",
          tagname,
          ".",
      ]
  
      cmd_str = " ".join(cmd)
      try:
          subprocess.run(cmd, check=True)
      except subprocess.CalledProcessError as e:
          raise ValueError(f"{cmd_str} failed.") from e
      print("Build Finished: ", cmd_str)
  
imports: import os
  from typing import List, Optional
  import fire
  import subprocess
label_desc: Use image node_id 1 for calling a global function with example usage: build(dockerfile, tagname, python_version, workdir, install_cmd) without return types