@classmethod
  def _GetNameFromUser(cls, user, prefer_given_name=True):
    if user.given_name and prefer_given_name:
      return user.given_name
    elif user.name:
      return user.name
    elif user.email:
      return user.email
    else:
      return 'A friend'
Gets the name of a user. Prefers the given name, then the full name, then the email, then
dataset/ETHPy150Open viewfinderco/viewfinder/backend/op/alert_manager.py/AlertManager._GetNameFromUser