def Modified(self):
    """Also updates the state of the containing oneof in the parent message."""
    try:
      self._parent_message_weakref._UpdateOneofState(self._field)
      super(_OneofListener, self).Modified()
    except ReferenceError:
      pass
Also updates the state of the containing oneof in the parent message.
deps/protobuf/python/google/protobuf/internal/python_message.py