def get_module_name(package):
    """
    package must have these attributes:
    e.g.:
        package.DISTRIBUTION_NAME = "DragonPyEmulator"
        package.DIST_GROUP = "console_scripts"
        package.ENTRY_POINT = "DragonPy"

    :return: a string like: "dragonpy.core.cli"
    """
    distribution = get_distribution(package.DISTRIBUTION_NAME)
    entry_info = distribution.get_entry_info(package.DIST_GROUP, package.ENTRY_POINT)
    if not entry_info:
        raise RuntimeError(
            "Can't find entry info for distribution: %r (group: %r, entry point: %r)" % (
                package.DISTRIBUTION_NAME, package.DIST_GROUP, package.ENTRY_POINT
            )
        )
    return entry_info.module_name
package must have these attributes:
    e.g.:
        package.DISTRIBUTION_NAME = "DragonPyEmulator"
        package.DIST_GROUP = "console_scripts"
        package.ENTRY_POINT = "DragonPy"

    :return: a string like: "dragonpy.core.cli"