code: def build(root_path, is_nightly=False, rc_index=None):
      if os.path.exists(build_directory):
          raise ValueError(
              f"Directory already exists: {build_directory}"
          )
  
      try:
          copy_source_to_build_directory(root_path)
          run_namex_conversion()
          create_legacy_directory()
          from keras.src.version import __version__  # noqa: E402
  
          export_version_string(__version__, is_nightly, rc_index)
          return build_and_save_output(root_path, __version__)
      finally:
          # Clean up: remove the build directory (no longer needed)
          shutil.rmtree(build_directory)
  
file_path: keras/pip_build.py
imports: import argparse
  import datetime
  import glob
  import os
  import pathlib
  import shutil
  import namex
  import torch
label_desc: Use image node_id 7 for calling a global function with example usage: build(root_path, is_nightly, rc_index) and returns: build_and_save_output