def _is_backfill(event):
  """Checks if the event corresponds to a backfill request.

  Args:
    event: the event generated by pub/sub trigger

  Returns:
    True if message contains backfill attribute
    False otherwise
  """
  return event.get('attributes') is not None and event.get('attributes').get(
      'backfill') is not None