code: def build(self):
      print("Proceed with build from source...")
      compiler = self.get_compiler()
      cuda_cflags, cuda_lflags = get_cuda_build_flags()
  
      with tempfile.TemporaryDirectory(prefix="dali_stub_") as tmpdir:
          # Building a DALI stub library. During runtime, the real libdali.so will be already
          # loaded at the moment when the DALI TF plugin is loaded
          # This is done to avoid depending on DALI being installed during
          # DALI TF sdist installation
          dali_stub_src = os.path.join(tmpdir, "dali_stub.cc")
          dali_stub_lib = os.path.join(tmpdir, "libdali.so")
          dali_c_api_hdr = os.path.join(
              self.src_path, "include", "dali", "c_api.h"
          )
          with open(dali_stub_src, "w+") as f:
              stubgen(header_filepath=dali_c_api_hdr, out_file=f)
  
          dali_lflags = "-L" + tmpdir + " -ldali"
          dali_cflags = "-I" + os.path.join(self.src_path, "include")
  
          cmd = (
              compiler
              + " -Wl,-R,'$ORIGIN/..' -std=c++14 -DNDEBUG -shared "
              + dali_stub_src
              + " -o "
              + dali_stub_lib
              + " -fPIC "
              + dali_cflags
              + " "
              + cuda_cflags
              + " "
              + cuda_lflags
              + " -O2"
          )
          print("Building DALI stub lib:\n\n " + cmd + "\n\n")
          subprocess.check_call(cmd, cwd=self.src_path, shell=True)
  
          tf_cflags, tf_lflags = get_tf_build_flags()
  
          filenames = ["daliop.cc", "dali_dataset_op.cc"]
          plugin_src = ""
          for filename in filenames:
              plugin_src = (
                  plugin_src
                  + " "
                  + os.path.join(self.src_path, filename)
              )
  
          lib_filename = "libdali_tf_current.so"
          lib_path = os.path.join(self.plugin_dest_dir, lib_filename)
  
          # for a newer TF we need to compiler with C++17
          cpp_ver = (
              "--std=c++14"
              if self.tf_version < LooseVersion("2.10")
              else "--std=c++17"
          )
          # Note: DNDEBUG flag is needed due to issue with TensorFlow custom ops:
          # https://github.com/tensorflow/tensorflow/issues/17316
          # Do not remove it.
          # the latest TF in conda needs to include /PREFIX/include
          root_include = (
              "-I" + os.getenv("PREFIX", default="/usr") + "/include"
          )
          cmd = (
              compiler
              + " -Wl,-R,'$ORIGIN/..' -Wl,-rpath,'$ORIGIN' "
              + cpp_ver
              + " -DNDEBUG -shared "
              + plugin_src
              + " -o "
              + lib_path
              + " -fPIC "
              + dali_cflags
              + " "
              + tf_cflags
              + " "
              + root_include
              + " "
              + cuda_cflags
              + " "
              + dali_lflags
              + " "
              + tf_lflags
              + " "
              + cuda_lflags
              + " -O2"
          )
          print("Build DALI TF library:\n\n " + cmd + "\n\n")
          subprocess.check_call(cmd, cwd=self.src_path, shell=True)
  
          if not self.check_plugin(lib_path, dali_stub_lib):
              raise ImportError(
                  "Error while loading or testing the DALI TF plugin built "
                  + "from source, will not install"
              )
          print("Installation successful")
  
imports: import platform
  from shutil import copyfile
  from dali_tf_plugin_utils import get_module_path, is_conda_env, get_tf_version, get_tf_compiler_version, get_cpp_compiler, get_cpp_compiler_version, which, find, find_available_prebuilt_tf, get_cuda_build_flags, get_tf_build_flags
  import os
  from distutils.version import StrictVersion, LooseVersion
  from pathlib import Path
  import tempfile
  from stubgen import stubgen
  from multiprocessing import Process
  import subprocess
label_desc: Use image node_id 9 for calling the InstallerHelper obj's underlying member method code with example usage: obj.build() without return types