def get_source_file(filename, include_no_ext=False):
filename = os.path.abspath(_path_from_filename(filename))<EOL>base, orig_ext = os.path.splitext(filename)<EOL>for ext in PY_SOURCE_EXTS:<EOL><INDENT>source_path = "<STR_LIT>" % (base, ext)<EOL>if os.path.exists(source_path):<EOL><INDENT>return source_path<EOL><DEDENT><DEDENT>if include_no_ext and not orig_ext and os.path.exists(base):<EOL><INDENT>return base<EOL><DEDENT>raise NoSourceFile(filename)<EOL>
given a python module's file name return the matching source file
    name (the filename will be returned identically if it's already an
    absolute path to a python source file...)

    :type filename: str
    :param filename: python module's file name


    :raise NoSourceFile: if no source file exists on the file system

    :rtype: str
    :return: the absolute path of the source file if it exists