docstr: Handle the different versions of GNU fortran compilers
docstr_tok: ["Handle","the","different","versions","of","GNU","fortran","compilers"]
code: def gnu_version_match(self, version_string):
      """Handle the different versions of GNU fortran compilers"""
      # Strip warning(s) that may be emitted by gfortran
      while version_string.startswith("gfortran: warning"):
          version_string = version_string[
              version_string.find("\n") + 1 :
          ].strip()
  
      # Gfortran versions from after 2010 will output a simple string
      # (usually "x.y", "x.y.z" or "x.y.z-q") for ``-dumpversion``; older
      # gfortrans may still return long version strings (``-dumpversion`` was
      # an alias for ``--version``)
      if len(version_string) <= 20:
          # Try to find a valid version string
          m = re.search(r"([0-9.]+)", version_string)
          if m:
              # g77 provides a longer version string that starts with GNU
              # Fortran
              if version_string.startswith("GNU Fortran"):
                  return ("g77", m.group(1))
  
              # gfortran only outputs a version string such as #.#.#, so check
              # if the match is at the start of the string
              elif m.start() == 0:
                  return ("gfortran", m.group(1))
      else:
          # Output probably from --version, try harder:
          m = re.search(
              r"GNU Fortran\s+95.*?([0-9-.]+)", version_string
          )
          if m:
              return ("gfortran", m.group(1))
          m = re.search(
              r"GNU Fortran.*?\-?([0-9-.]+\.[0-9-.]+)", version_string
          )
          if m:
              v = m.group(1)
              if (
                  v.startswith("0")
                  or v.startswith("2")
                  or v.startswith("3")
              ):
                  # the '0' is for early g77's
                  return ("g77", v)
              else:
                  # at some point in the 4.x series, the ' 95' was dropped
                  # from the version string
                  return ("gfortran", v)
  
      # If still nothing, raise an error to make the problem easy to find.
      err = "A valid Fortran version was not found in this string:\n"
      raise ValueError(err + version_string)
  
imports: import re
  import os
  import sys
  import warnings
  import platform
  import tempfile
  import hashlib
  import base64
  import subprocess
  from subprocess import Popen, PIPE, STDOUT
  from numpy.distutils.exec_command import filepath_from_subprocess_output
  from numpy.distutils.fcompiler import FCompiler
  from distutils.version import LooseVersion
label_desc: Use image node_id 1 for calling the GnuFCompiler obj's underlying member method code with example usage: obj.gnu_version_match(version_string) and returns: str,  m, str,  m, str,  v, str,  v, str,  m