'Find a verification in a set that applied during a particular datetime.
A verification is considered "active" during a datetime if:
1) The verification was created before the datetime, and
2) The verification is set to expire after the datetime.
Note that verification status is *not* considered here,
just the start/expire dates.
If multiple verifications were active at the deadline,
returns the most recently created one.
Arguments:
deadline (datetime): The datetime at which the verification applied.
If `None`, then return the most recently created candidate.
candidates (list of `PhotoVerification`s): Potential verifications to search through.
Returns:
PhotoVerification: A photo verification that was active at the deadline.
If no verification was active, return None.'

@classmethod
def verification_for_datetime(cls, deadline, candidates):

    if (len(candidates) == 0):
        return None
    if (deadline is None):
        return candidates[0]
    for verification in candidates:
        if verification.active_at_datetime(deadline):
            return verification
