def get_module(indir, toc_file):
    """The NetBeans module containing the toc_file.

    Assuming indir is the root directory of the NetBeans project,
    the module is the top-most directory of the toc_file under indir.
    """

    return toc_file.relative_to(indir).parts[0]