code: def build_temp_model_file(build_fn_str, source_script):
      """Construct a string containing extracted imports from both `build_fn_str` and `source_script`
  
      Parameters
      ----------
      build_fn_str: Str
          The stringified source code of a callable
      source_script: Str
          Absolute path to a Python file. Expected to end with '.py', or '.ipynb'
  
      Returns
      -------
      temp_file_Str: Str
          Combination of extracted imports, and clean `build_fn_str` in Python script format
      """
      source_script_contents = read_source_script(source_script)
  
      builder_imports = extract_imports(build_fn_str)
      source_imports = extract_imports(source_script_contents)
  
      cleaned_builder_str = remove_imports(
          remove_comments(build_fn_str)
      )
  
      temp_file_str = ""
      temp_file_str += source_imports
      temp_file_str += builder_imports.replace("#coding=utf-8", "")
      temp_file_str += "\n\n"
      temp_file_str += cleaned_builder_str
  
      return temp_file_str
  
imports: from hyperparameter_hunter.utils.file_utils import RetryMakeDirs
  from ast import NodeVisitor, parse
  from inspect import getsource
  from operator import attrgetter
  import os
  import re
label_desc: Use image node_id 2 for calling a global function with example usage: build_temp_model_file(build_fn_str, source_script) and returns: temp_file_str