def METHOD_NAME(message_time: dt.datetime) -> dt.datetime:
    """
    Returns the datetime for the first attempt of a pending message.
    If the message time field is in the past, we use this value to process historical
    messages in order. If the message time field is in the future, meaning that
    someone is trying to manipulate the execution order of messages, default to
    the current time.
    :param message_time: Value of the message time field.
    :return: The next (first) attempt time as a datetime object.
    """
    return min(message_time, utc_now())