def add_field_def(self, field_def):
        self._check()
        if self._index != field_def.index:
            raise ValueError("Invalid field index")
        self._index += 1
        self._field_defs.append(field_def)
        return self
dataset/ETHPy150Open hazelcast/hazelcast-python-client/hazelcast/serialization/portable/classdef.py/ClassDefinitionBuilder.add_field_def/original