code: def find_static_library(
      library_name: str, library_path: List[str]
  ) -> Optional[str]:
      """Given the raw name of a library in `library_name`, tries to find a
      static library with this name in the given `library_path`. `library_path`
      is automatically extended with common library directories on Linux and Mac
      OS X."""
  
      variants = ["lib{0}.a", "{0}.a", "{0}.lib", "lib{0}.lib"]
      if is_unix_like():
          extra_libdirs = [
              "/opt/homebrew/lib",  # for newer Homebrew installations on macOS
              "/usr/local/lib64",
              "/usr/local/lib",
              "/usr/lib/x86_64-linux-gnu",
              "/usr/lib64",
              "/usr/lib",
              "/lib64",
              "/lib",
          ]
      else:
          extra_libdirs = []
  
      for path in extra_libdirs:
          if path not in library_path and os.path.isdir(path):
              library_path.append(path)
  
      for path in library_path:
          for variant in variants:
              full_path = os.path.join(
                  path, variant.format(library_name)
              )
              if os.path.isfile(full_path):
                  return full_path
  
imports: import os
  import platform
  import sys
  from setuptools import find_packages, setup, Command, Extension
  import glob
  import shlex
  import shutil
  import subprocess
  import sysconfig
  from contextlib import contextmanager
  from pathlib import Path
  from select import select
  from shutil import which
  from time import sleep
  from typing import List, Iterable, Iterator, Optional, Tuple, TypeVar, Union
label_desc: Use image node_id 7 for calling a global function with example usage: find_static_library(library_name, library_path) and returns: full_path