def METHOD_NAME(
    user_id: str, exploration_id: str
) -> Optional[datetime.datetime]:
    """Fetches the datetime the exploration was last rated by this user, or
    None if no rating has been awarded.
    Currently this function is only used for testing purposes.
    Args:
        user_id: str. The id of the user.
        exploration_id: str. The id of the exploration.
    Returns:
        datetime.datetime or None. When the exploration was last
        rated by the user, or None if the user has not previously
        rated the exploration.
    """
    exp_user_data_model = user_models.ExplorationUserDataModel.get(
        user_id, exploration_id)
    return exp_user_data_model.rated_on if exp_user_data_model else None