code: def build_for_backend(name, src, srcdir):
      suffix = sysconfig.get_config_var("EXT_SUFFIX")
      so = os.path.join(
          srcdir, "{name}{suffix}".format(name=name, suffix=suffix)
      )
      # try to avoid setuptools if possible
      cc = os.environ.get("CC")
      if cc is None:
          # TODO: support more things here.
          clang = shutil.which("clang")
          gcc = shutil.which("gcc")
          cc = gcc if gcc is not None else clang
          if cc is None:
              raise RuntimeError(
                  "Failed to find C compiler. Please specify via CC environment variable."
              )
      # This function was renamed and made public in Python 3.10
      if hasattr(sysconfig, "get_default_scheme"):
          scheme = sysconfig.get_default_scheme()
      else:
          scheme = sysconfig._get_default_scheme()
      # 'posix_local' is a custom scheme on Debian. However, starting Python 3.10, the default install
      # path changes to include 'local'. This change is required to use triton with system-wide python.
      if scheme == "posix_local":
          scheme = "posix_prefix"
      py_include_dir = sysconfig.get_paths(scheme=scheme)["include"]
  
      ret = subprocess.check_call(
          [
              cc,
              src,
              f"-I{py_include_dir}",
              f"-I{srcdir}",
              "-shared",
              "-fPIC",
              "-o",
              so,
          ]
      )
      if ret == 0:
          return so
      # fallback on setuptools
      extra_compile_args = []
      library_dirs = []
      include_dirs = [srcdir]
      libraries = []
      # extra arguments
      extra_link_args = []
      # create extension module
      ext = setuptools.Extension(
          name=name,
          language="c",
          sources=[src],
          include_dirs=include_dirs,
          extra_compile_args=extra_compile_args + ["-O3"],
          extra_link_args=extra_link_args,
          library_dirs=library_dirs,
          libraries=libraries,
      )
      # build extension module
      args = ["build_ext"]
      args.append("--build-temp=" + srcdir)
      args.append("--build-lib=" + srcdir)
      args.append("-q")
      args = dict(
          name=name,
          ext_modules=[ext],
          script_args=args,
      )
      with quiet():
          setuptools.setup(**args)
      return so
  
imports: import functools
  import hashlib
  import importlib
  import os
  import shutil
  import subprocess
  import sysconfig
  import tempfile
  from pathlib import Path
  import setuptools
  import torch
  import triton
  import triton.language
  from triton.common.backend import BaseBackend, compute_core_version_key, register_backend
  from triton.common.build import quiet
  from triton.compiler.make_launcher import make_so_cache_key
  from triton.runtime.cache import get_cache_manager
  from triton.runtime.driver import DriverBase
label_desc: Use image node_id 1 for calling a global function with example usage: build_for_backend(name, src, srcdir) and returns: so, so