def METHOD_NAME(incl_args, directory):
    for arg in incl_args:
        # new, recursive, relative include
        if not (directory and tryarg(directory, arg)):
            # old include (relative to master file)
            if not (basedir and tryarg(basedir, arg)):
                # if path is given, also search there:
                for p in include_path:
                    if tryarg(p, arg):
                        break