code: def parse_args(args):
      from optparse import OptionParser
  
      parser = OptionParser(
          usage="%prog [options] [sources and packages]+"
      )
  
      parser.add_option(
          "-X",
          "--directive",
          metavar="NAME=VALUE,...",
          dest="directives",
          default={},
          type="str",
          action="callback",
          callback=parse_directives,
          help="set a compiler directive",
      )
      parser.add_option(
          "-E",
          "--compile-time-env",
          metavar="NAME=VALUE,...",
          dest="compile_time_env",
          default={},
          type="str",
          action="callback",
          callback=parse_compile_time_env,
          help="set a compile time environment variable",
      )
      parser.add_option(
          "-s",
          "--option",
          metavar="NAME=VALUE",
          dest="options",
          default={},
          type="str",
          action="callback",
          callback=parse_options,
          help="set a cythonize option",
      )
      parser.add_option(
          "-2",
          dest="language_level",
          action="store_const",
          const=2,
          default=None,
          help="use Python 2 syntax mode by default",
      )
      parser.add_option(
          "-3",
          dest="language_level",
          action="store_const",
          const=3,
          help="use Python 3 syntax mode by default",
      )
      parser.add_option(
          "--3str",
          dest="language_level",
          action="store_const",
          const="3str",
          help="use Python 3 syntax mode by default",
      )
      parser.add_option(
          "-a",
          "--annotate",
          dest="annotate",
          action="store_true",
          help="generate annotated HTML page for source files",
      )
  
      parser.add_option(
          "-x",
          "--exclude",
          metavar="PATTERN",
          dest="excludes",
          action="append",
          default=[],
          help="exclude certain file patterns from the compilation",
      )
  
      parser.add_option(
          "-b",
          "--build",
          dest="build",
          action="store_true",
          help="build extension modules using distutils",
      )
      parser.add_option(
          "-i",
          "--inplace",
          dest="build_inplace",
          action="store_true",
          help="build extension modules in place using distutils (implies -b)",
      )
      parser.add_option(
          "-j",
          "--parallel",
          dest="parallel",
          metavar="N",
          type=int,
          default=parallel_compiles,
          help=(
              "run builds in N parallel jobs (default: %d)"
              % parallel_compiles
              or 1
          ),
      )
      parser.add_option(
          "-f",
          "--force",
          dest="force",
          action="store_true",
          help="force recompilation",
      )
      parser.add_option(
          "-q",
          "--quiet",
          dest="quiet",
          action="store_true",
          help="be less verbose during compilation",
      )
  
      parser.add_option(
          "--lenient",
          dest="lenient",
          action="store_true",
          help="increase Python compatibility by ignoring some compile time errors",
      )
      parser.add_option(
          "-k",
          "--keep-going",
          dest="keep_going",
          action="store_true",
          help="compile as much as possible, ignore compilation failures",
      )
      parser.add_option(
          "-M",
          "--depfile",
          action="store_true",
          help="produce depfiles for the sources",
      )
  
      options, args = parser.parse_args(args)
      if not args:
          parser.error("no source files provided")
      if options.build_inplace:
          options.build = True
      if multiprocessing is None:
          options.parallel = 0
      if options.language_level:
          assert options.language_level in (2, 3, "3str")
          options.options["language_level"] = options.language_level
      return options, args
  
imports: from __future__ import absolute_import
  import os
  import shutil
  import tempfile
  from distutils.core import setup
  from .Dependencies import cythonize, extended_iglob
  from ..Utils import is_package_dir
  from ..Compiler import Options
label_desc: Use image node_id 7 for calling a global function with example usage: parse_args(args) and returns: options,  args