code: def _embed_libiomp(self):
      lib_dir = os.path.join(self.build_lib, "torch", "lib")
      libtorch_cpu_path = os.path.join(lib_dir, "libtorch_cpu.dylib")
      if not os.path.exists(libtorch_cpu_path):
          return
      # Parse libtorch_cpu load commands
      otool_cmds = (
          subprocess.check_output(["otool", "-l", libtorch_cpu_path])
          .decode("utf-8")
          .split("\n")
      )
      rpaths, libs = [], []
      for idx, line in enumerate(otool_cmds):
          if line.strip() == "cmd LC_LOAD_DYLIB":
              lib_name = otool_cmds[idx + 2].strip()
              assert lib_name.startswith("name ")
              libs.append(
                  lib_name.split(" ", 1)[1].rsplit("(", 1)[0][:-1]
              )
  
          if line.strip() == "cmd LC_RPATH":
              rpath = otool_cmds[idx + 2].strip()
              assert rpath.startswith("path ")
              rpaths.append(
                  rpath.split(" ", 1)[1].rsplit("(", 1)[0][:-1]
              )
  
      omp_lib_name = "libiomp5.dylib"
      if os.path.join("@rpath", omp_lib_name) not in libs:
          return
  
      # Copy libiomp5 from rpath locations
      for rpath in rpaths:
          source_lib = os.path.join(rpath, omp_lib_name)
          if not os.path.exists(source_lib):
              continue
          target_lib = os.path.join(
              self.build_lib, "torch", "lib", omp_lib_name
          )
          self.copy_file(source_lib, target_lib)
          break
  
imports: import sys
  import platform
  import filecmp
  import glob
  import importlib
  import json
  import os
  import shutil
  import subprocess
  import sysconfig
  import time
  from collections import defaultdict
  import setuptools.command.build_ext
  import setuptools.command.install
  import setuptools.command.sdist
  from setuptools import Extension, find_packages, setup
  from setuptools.dist import Distribution
  from tools.build_pytorch_libs import build_caffe2
  from tools.generate_torch_version import get_torch_version
  from tools.setup_helpers.cmake import CMake
  from tools.setup_helpers.env import build_type, IS_DARWIN, IS_LINUX, IS_WINDOWS
label_desc: Use image node_id 1 for calling the build_ext obj's underlying member method code with example usage: obj._embed_libiomp() without return types