@classmethod
  def _GetNameFromUser(cls, user, prefer_given_name=True):
    """Gets the name of a user. Prefers the given name, then the full name, then the email, then
    just "A friend". If "prefer_given_name" is false, then don't use the given name.
    """
    if user.given_name or prefer_given_name:
      return user.given_name
    elif user.name:
      return user.name
    elif user.email:
      return user.email
    else:
      return 'A friend'
dataset/ETHPy150Open viewfinderco/viewfinder/backend/op/alert_manager.py/AlertManager._GetNameFromUser/operator `and` -> `or`