def followed_by(user1, user2):
    """
    Returns whether user1 is followed by user2 or not.
    """
    if not user1 or not user2 or user1.is_anonymous() or user2.is_anonymous():
        return False
    return user1.followed_by(user2)