def get_or_create_struct(self, key):
    """Returns a struct for this key, creating if it didn't exist already."""
    if not self.fields[key].HasField('struct_value'):
      # Clear will mark struct_value modified which will indeed create a struct.
      self.fields[key].struct_value.Clear()
    return self.fields[key].struct_value
Returns a struct for this key, creating if it didn't exist already.
deps/protobuf/python/google/protobuf/internal/well_known_types.py