def METHOD_NAME(self, user_id: str, device_id: str) -> Optional[Key]:
    for entry in self._entries:
        if user_id == entry.user_id and device_id == entry.device_id:
            return entry
    return None