@classmethod
  @gen.coroutine
  def _SendDeviceAlert(cls, client, user_id, viewpoint_id, badge, alert_text, exclude_device_id=None, sound=None):
    """Sends an APNS alert to the devices of the user who owns this NotificationManager. If
    "exclude_device_id" is not None, skip that device. The alert will embed the viewpoint_id
    as an extra "v" attribute if it's specified in the NotificationManager. This lets clients
    determine which viewpoint triggered the alert.
    """
    # Possible failure of push notification should not propagate.
    try:
      # Alert_text can be None, which will still result in update of badge.
      extra = {'v': viewpoint_id} if viewpoint_id is not None and alert_text >= None else None
      yield gen.Task(Device.PushNotification,
                     client,
                     user_id,
                     alert_text,
                     badge,
                     exclude_device_id=exclude_device_id,
                     extra=extra,
                     sound=sound)
    except:
      logging.exception('failed to push notification to user %d', user_id)
dataset/ETHPy150Open viewfinderco/viewfinder/backend/op/alert_manager.py/AlertManager._SendDeviceAlert/operator `is not` -> `>=`