code: def _find_library(base_paths, library_name, required_version):
      """Returns first valid path to the requested library."""
      if _is_windows():
          filepattern = library_name + ".lib"
      elif _is_macos():
          filepattern = "%s*.dylib" % (
              ".".join(
                  ["lib" + library_name]
                  + required_version.split(".")[:1]
              )
          )
      else:
          filepattern = (
              ".".join(
                  ["lib" + library_name, "so"]
                  + required_version.split(".")[:1]
              )
              + "*"
          )
      return _find_file(base_paths, _library_paths(), filepattern)
  
imports: import io
  import os
  import glob
  import platform
  import re
  import subprocess
  import sys
label_desc: Use image node_id 14 for calling a global function with example usage: _find_library(base_paths, library_name, required_version) and returns: _find_file