human
Complete this python program:
def cythonize(module_list, exclude=None, nthreads=0, aliases=None, quiet=False, force=False, language=None, exclude_failures=False, **options):
assistant
#Here is the Python program you requested.

    """Compile a set of source modules into C/C++ files and return a list of distutils
    Extension objects for them.
    As module list, pass either a glob pattern, a list of glob patterns or a list of
    Extension objects.  The latter allows you to configure the extensions separately
    through the normal distutils options.
    When using glob patterns, you can exclude certain module names explicitly
    by passing them into the \exclude\ option.
    To globally enable C++ mode, you can pass language=\c++\.  Otherwise, this
    will be determined at a per-file level based on compiler directives.  This
    affects only modules found based on file names.  Extension instances passed
    into cythonize() will not be changed.
    For parallel compilation, set the \nthreads\ option to the number of
    concurrent builds.
    For a broad \try to compile\ mode that ignores compilation failures and
    simply excludes the failed extensions, pass \exclude_failures=True\. Note
    that this only really makes sense for compiling .py files which can also
    be used without compilation.
    Additional compilation options can be passed as keyword arguments.
    """
    if (exclude is None):
        exclude = []
    if ('include_path' not in options):
        options['include_path'] = ['.']
    if ('common_utility_include_dir' in options):
        if options.get('cache'):
            raise NotImplementedError('common_utility_include_dir    does    not    yet    work    with    caching')
        safe_makedirs(options['common_utility_include_dir'])
    if PythranAvailable:
        pythran_options = CompilationOptions(**options)
        pythran_options.cplus = True
        pythran_options.np_pythran = True
        pythran_include_dir = os.path.dirname(pythran.__file__)
    c_options = CompilationOptions(**options)
    cpp_options = CompilationOptions(**options)
    cpp_options.cplus = True
    ctx = c_options.create_context()
    options = c_options
    (module_list, module_metadata) = create_extension_list(module_list, exclude=exclude, ctx=ctx, quiet=quiet, exclude_failures=exclude_failures, language=language, aliases=aliases)
    deps = create_dependency_tree(ctx, quiet=quiet)
    build_dir = getattr(options, 'build_dir', None)
    modules_by_cfile = {}
    to_compile = []
    for m in module_list:
        if build_dir:
            root = os.getcwd()
            def copy_to_build_dir(filepath, root=root):
                filepath_abs = os.path.abspath(filepath)
                if os.path.isabs(filepath):
                    filepath = filepath_abs
                if filepath_abs.startswith(root):
                    mod_dir = join_path(build_dir, os.path.dirname(_relpath(filepath, root)))
                    copy_once_if_newer(filepath_abs, mod_dir)
            for dep in m.depends:
                copy_to_build_dir(dep)
        new_sources = []
        for source in m.sources:
            (base, ext) = os.path.splitext(source)
            if (ext in ('.pyx', '.py')):
                if m.np_pythran:
                    c_file = (base + '.cpp')
                    options = pythran_options
                elif (m.language == 'c++'):
                    c_file = (base +...