code: def check_gcc_version_at_least(cmd, major, minor=0, patchlevel=0):
      """
      Check that the gcc version is at least the specified version."""
  
      cmd._check_compiler()
      version = ".".join([str(major), str(minor), str(patchlevel)])
      body = textwrap.dedent(
          """
          int
          main()
          {
          #if (! defined __GNUC__) || (__GNUC__ < %(major)d) || \\
                  (__GNUC_MINOR__ < %(minor)d) || \\
                  (__GNUC_PATCHLEVEL__ < %(patchlevel)d)
          #error gcc >= %(version)s required
          #endif
              return 0;
          }
          """
      )
      kw = {
          "version": version,
          "major": major,
          "minor": minor,
          "patchlevel": patchlevel,
      }
  
      return cmd.try_compile(body % kw, None, None)
  
file_path: numpy/numpy/distutils/command/autodist.py
imports: import textwrap
label_desc: Use image node_id 4 for calling a global function with example usage: check_gcc_version_at_least(cmd, major, minor, patchlevel) and returns: cmd