def _get_application_module(self, controller, application):
        """Return the module for an application. If it's a entry-point
        registered application name, return the module name from the entry
        points data. If not, the passed in application name is returned.

        :param str controller: The controller type
        :param str application: The application name or module
        :rtype: str

        """
        for pkg in self._get_applications(controller):
            if pkg.name == application:
                return pkg.module_name
        return application