code: def patch_f90_compiler(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 Windows.
      if os.name != "nt":
          return
  
      # Only ``gfortran``.
      if not isinstance(f90_compiler, gnu.Gnu95FCompiler):
          return
  
      f90_compiler.compiler_f77[:] = _remove_fpic(f90_compiler.compiler_f77)
      f90_compiler.compiler_f90[:] = _remove_fpic(f90_compiler.compiler_f90)
      c_compiler = f90_compiler.c_compiler
      if c_compiler.compiler_type != "msvc":
          raise NotImplementedError(
              "MSVC is the only supported C compiler on Windows."
          )
docs: Patch up ``f90_compiler.library_dirs``.
  
      Updates flags in ``gfortran`` and ignores other compilers. The only
      modification is the removal of ``-fPIC`` since it is not used on Windows
      and the build flags turn warnings into errors.
  
      Args:
          f90_compiler (numpy.distutils.fcompiler.FCompiler): A Fortran compiler
              instance.