code: def is_free_format(file):
      """Check if file is in free format Fortran."""
      # f90 allows both fixed and free format, assuming fixed unless
      # signs of free format are detected.
      result = 0
      f = open_latin1(file, "r")
      line = f.readline()
      n = 10000  # the number of non-comment lines to scan for hints
      if _has_f_header(line):
          n = 0
      elif _has_f90_header(line):
          n = 0
          result = 1
      while n > 0 and line:
          line = line.rstrip()
          if line and line[0] != "!":
              n -= 1
              if (
                  line[0] != "\t" and _free_f90_start(line[:5])
              ) or line[-1:] == "&":
                  result = 1
                  break
          line = f.readline()
      f.close()
      return result
  
imports: from __future__ import division, absolute_import, print_function
  import os
  import sys
  import re
  import types
  from numpy.compat import open_latin1
  from distutils.sysconfig import get_python_lib
  from distutils.fancy_getopt import FancyGetopt
  from distutils.errors import DistutilsModuleError, DistutilsExecError, CompileError, LinkError, DistutilsPlatformError
  from distutils.util import split_quoted, strtobool
  from numpy.distutils.ccompiler import CCompiler, gen_lib_options
  from numpy.distutils import log
  from numpy.distutils.misc_util import is_string, all_strings, is_sequence, make_temp_file, get_shared_lib_extension
  from numpy.distutils.exec_command import find_executable
  from numpy.distutils.compat import get_exception
  from numpy.distutils import _shell_utils
  from .environment import EnvironmentConfig
label_desc: Use image node_id 11 for calling a global function with example usage: is_free_format(file) and returns: result