code: def _check_version(filename, flag="GLIBC"):
      subfile = None
      if flag == "GLIBC":
          subfile = _check_glibc_version(filename)
      if flag == "GLIBCXX":
          subfile = _check_glibcxx_version(filename)
      max_version = None
      for version_string in subfile.split():
          try:
              version = Version(version_string.split("_")[1])
              if max_version is None or version > max_version:
                  max_version = version
          except Exception:
              pass
      return max_version
  
imports: import subprocess
  from packaging.version import Version
  import pathlib
label_desc: Use image node_id 1 for calling a global function with example usage: _check_version(filename, flag) and returns: max_version