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