import json


def get_person_person_key(person1_id: str, person2_id: str):
    """
    Get a unique string from the 2 person IDs in a deterministic way.

    :param person1_id: the ID of the first person
    :param person2_id: the ID of the second person
    :return: the derived unique key
    """
    return json.dumps(sorted([person1_id, person2_id]))