class Node2(Serializable, BaseWithKey): a = ListField('a', ValueType.list(ValueType.string)) _key = StringField('key') _id = StringField('id') _name = UnicodeField('name') data = ListField('data', ValueType.int32) @classmethod def cls(cls, provider): if provider.type == ProviderType.protobuf: from mars.serialize.tests.testser_pb2 import Node2Def return Node2Def return super(Node2, cls).cls(provider)
class Node5(AttributeAsDict): a = StringField('a')
class Node5(AttributeAsDict): a = StringField('a') b = SliceField('b')