code: def patch_lib_paths(fname, library_dirs):
      
      if sys.platform != 'darwin':
          return
      
      libs = _get_libs(fname)
      for lib in libs:
          if not lib.startswith(('@', '/')):
              real_lib = _find_library(lib, library_dirs)
              if real_lib:
                  _install_name_change(fname, lib, real_lib)
docs: Load any weakly-defined libraries from their real location
      
      (only on OS X)
      
      - Find libraries with `otool -L`
      - Update with `install_name_tool -change`