code: def is_macos_gfortran(f90_compiler):
      
      # NOTE: NumPy may not be installed, but we don't want **this** module to
      #       cause an import failure.
      from numpy.distutils.fcompiler import gnu
  
      # Only macOS.
      if sys.platform != MAC_OS:
          return False
  
      # Only ``gfortran``.
      if not isinstance(f90_compiler, gnu.Gnu95FCompiler):
          return False
  
      return True
docs: Checks if the current build is ``gfortran`` on macOS.
  
      Args:
          f90_compiler (numpy.distutils.fcompiler.FCompiler): A Fortran compiler
              instance.
  
      Returns:
          bool: Only :data:`True` if
  
          * Current OS is macOS (checked via ``sys.platform``).
          * ``f90_compiler`` corresponds to ``gfortran``.