code: def new_event(event):
      
      op_name = event.EventType.DESCRIPTOR.values_by_number[event.type].name
      if op_name == 'PUT':
          cls = PutEvent
      elif op_name == 'DELETE':
          cls = DeleteEvent
      else:
          raise Exception('Invalid op_name')
  
      return cls(event)
docs: Wrap a raw gRPC event in a friendlier containing class.
  
      This picks the appropriate class from one of PutEvent or DeleteEvent and
      returns a new instance.