code: def with_minrpc(
      compile_func, server="posix_popen_server", runtime="libtvm"
  ):
      """Attach the compiler function with minrpc related options.
  
      Parameters
      ----------
      compile_func : Union[str, Callable[[str, str, Optional[str]], None]]
          The compilation function to decorate.
  
      server : str
          The server type.
  
      runtime : str
          The runtime library.
  
      Returns
      -------
      fcompile : function
          The return compilation.
      """
      minrpc_dir, server_path = find_minrpc_server_libpath(server)
      runtime_path = libinfo.find_lib_path(
          [runtime, runtime + ".so", runtime + ".dylib"]
      )[0]
  
      runtime_dir = os.path.abspath(os.path.dirname(runtime_path))
      options = ["-std=c++17"]
      # Make sure the rpath to the libtvm is set so we can do local tests.
      # Note that however, this approach won't work on remote.
      # Always recommend to link statically.
      options += ["-Wl,-rpath=" + runtime_dir]
      options += ["-I" + path for path in libinfo.find_include_path()]
      options += ["-I" + minrpc_dir]
      fcompile = cc.cross_compiler(
          compile_func,
          options=options,
          add_files=[server_path, runtime_path],
      )
      fcompile.__name__ = "with_minrpc"
      fcompile.need_system_lib = True
      return fcompile
  
imports: import os
  from tvm._ffi import libinfo
  from tvm.contrib import cc
label_desc: Use image node_id 2 for calling a global function with example usage: with_minrpc(compile_func, server, runtime) and returns: fcompile