def _parse_record(record):
    """Return a list of all top-level importable names from a distribution's RECORD"""
    python_names = set()
    for rec in record.splitlines():
        # every entry is made up of three parts
        name = rec.rsplit(',', 2)[0]
        # RECORD paths are not required to be in the style of native paths
        name = name.split('/', 1)[0].split('\\', 1)[0]
        if not (name.startswith('..') # relative paths are typically data and anyway not findable
            or '-' in name # skip the .dist-info paths
            # there are other characters that would invalidate lookup
        ):
            if name.endswith(".py"):
                name = name[:-3]
            python_names.add(name)
    return python_names