code: def _linker_params(linker_cmd, compiler_cmd):
      """
      The linker command usually begins with the compiler
      command (possibly multiple elements), followed by zero or more
      params for shared library building.
  
      If the LDSHARED env variable overrides the linker command,
      however, the commands may not match.
  
      Return the best guess of the linker parameters by stripping
      the linker command. If the compiler command does not
      match the linker command, assume the linker command is
      just the first element.
  
      >>> _linker_params('gcc foo bar'.split(), ['gcc'])
      ['foo', 'bar']
      >>> _linker_params('gcc foo bar'.split(), ['other'])
      ['foo', 'bar']
      >>> _linker_params('ccache gcc foo bar'.split(), 'ccache gcc'.split())
      ['foo', 'bar']
      >>> _linker_params(['gcc'], ['gcc'])
      []
      """
      c_len = len(compiler_cmd)
      pivot = c_len if linker_cmd[:c_len] == compiler_cmd else 1
      return linker_cmd[pivot:]
  
imports: import os
  import sys
  import re
  import shlex
  import itertools
  from .None import sysconfig
  from ._modified import newer
  from .ccompiler import CCompiler, gen_preprocess_options, gen_lib_options
  from .errors import DistutilsExecError, CompileError, LibError, LinkError
  from ._log import log
  from ._macos_compat import compiler_fixup
label_desc: Use image node_id 3 for calling a global function with example usage: _linker_params(linker_cmd, compiler_cmd) and returns: linker_cmd