code: def link_shared_macos(so_name, objs, extra_args=None):
      """Link Hexagon shared library using docker container with proper tooling.
  
      Parameters
      ----------
      so_name : str
          Name of the shared library file.
      objs : list[str,StringImm]
      extra_args : dict (str->str) or Map<String,String>
          Additional arguments:
              'hex_arch' - Hexagon architecture, e.g. v68
  
      Returns
      -------
      ret_val : int
          This function returns 0 at the moment.
      """
  
      # The list of object files can be passed as built-in Python strings,
      # or as tvm.tir.StringImm's.
      def to_str(s):
          if isinstance(s, tvm.tir.StringImm):
              return s.value
          assert isinstance(s, str), (
              'argument "' + str(s) + '" should be a string or StrImm'
          )
          return s
  
      objs = [to_str(s) for s in objs]
  
      if not extra_args:
          extra_args = {}
      hex_arch = extra_args.get("hex_arch") or "v68"
  
      ses = ContainerSession(HEXAGON_SDK_DOCKER_IMAGE)
  
      hexagon_sdk_tools_path = ses.get_env("HEXAGON_TOOLCHAIN")
      libpath = os.path.join(
          hexagon_sdk_tools_path,
          "target",
          "hexagon",
          "lib",
          hex_arch,
          "G0",
      )
      linker = os.path.join(
          hexagon_sdk_tools_path, "bin", "hexagon-link"
      )
  
      # Copy input data to docker container
      docker_objs = [ses.copy_to(obj) for obj in objs]
      docker_so_name = ses.tmp_dir + "/" + os.path.basename(so_name)
  
      link_cmd = [linker, "-shared", "-fPIC", "-o", docker_so_name]
      link_cmd += docker_objs
      link_cmd += [
          "-Bdynamic",
          "-export-dynamic",
          "-L" + os.path.join(libpath, "pic"),
          "-lgcc",
      ]
      ses.exec(link_cmd)
  
      # Copy result back to host
      ses.copy_from(docker_so_name, so_name)
      return 0
  
imports: import os
  import pathlib
  import re
  from typing import List, Union
  import subprocess
  import sys
  import tarfile
  import io
  import numpy
  import tvm
  import tvm.contrib.cc
  from ..._ffi.registry import register_func
label_desc: Use image node_id 6 for calling a global function with example usage: link_shared_macos(so_name, objs, extra_args) and returns: int, s, s