<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def module_to_package_data( name: str, entry, path_prefixes: list = None ) -> typing.Union[dict, None]: """ Converts a module entry into a package data dictionary with information about the module. including version and location on disk :param name: :param entry: :param path_prefixes: :return: """


    if name.find('.') > -1:
        # Not interested in sub-packages, only root ones
        return None

    version = getattr(entry, '__version__', None)
    version = version if not hasattr(version, 'version') else version.version
    location = getattr(entry, '__file__', sys.exec_prefix)

    if version is None or location.startswith(sys.exec_prefix):
        # Not interested in core packages. They obviously are standard and
        # don't need to be included in an output.
        return None

    return dict(
        name=name,
        version=version,
        location=simplify_path(location, path_prefixes)
    )