from typing import List
from typing import Tuple
from typing import Set


def people_compatibility_sets(people: List) -> Tuple[List[Set], List[Set]]:
    """Converts personal schedules to sets for efficient compatibility checks.

    Args:
        people: A list of people to index.

    Returns:
        A tuple containing:
            * A list mapping each person to a set of (date, block) pairs
              corresponding to their availability.
            * A list mapping each person to the set of sites they have ranked.
    """
    people_blocks = []
    for person in people:
        person_blocks = set()
        for date, blocks in person['schedule'].items():
            for b in blocks:
                person_blocks.add((date, b))
        people_blocks.append(person_blocks)
    people_sites = [set(person['site_rank']) for person in people]
    return people_blocks, people_sites