def METHOD_NAME(dinfo, includefiles=(), filename=None, replace_suffix=True):
    """Returns the list of basenames a document is expected to create.
    The list is created based on includefiles and the define output-suffix and
    \bookOutputName and \bookOutputSuffix commands.
    You should add '.ext' and/or '-[0-9]+.ext' to find created files.
    If filename is given, it is regarded as the filename LilyPond is run on.
    Otherwise, the filename of the info's document is read.
    If replace_suffix is True (the default), special characters and spaces
    in the suffix are replaced with underscores (in the same way as LilyPond
    does it), using the replace_suffix_chars() function.
    """
    METHOD_NAME = []
    basepath = os.path.splitext(filename or dinfo.document.filename)[0]
    dirname, basename = os.path.split(basepath)
    if basepath:
        METHOD_NAME.append(basepath)
    def args():
        yield dinfo.output_args()
        for filename in includefiles:
            yield docinfo(filename).output_args()
    for type, arg in itertools.chain.from_iterable(args()):
        if type == "suffix":
            if replace_suffix:
                # LilyPond (lily-library.scm:223) does this, too
                arg = replace_suffix_chars(arg)
            arg = basename + '-' + arg
        path = os.path.normpath(os.path.join(dirname, arg))
        if path not in METHOD_NAME:
            METHOD_NAME.append(path)
    return METHOD_NAME