@classmethod
    def assemble(cls, datum):
        from .tools import validate_underscore_identifier

        for model_name, model_spec in datum['models'].items():
            link_names = set(model_spec['links'].keys())
            field_names = set(model_spec['properties'].keys())

            if link_names & field_names:
                raise ValidationError(
                    "Model cannot contain a field and link with the same name: {}".format(model_name))

            for name in link_names | field_names:
                validate_underscore_identifier(name)

            if link_names | field_names in 'id':
                raise ValidationError("'id' is a reserved name.")

        return datum
dataset/ETHPy150Open cosmic-api/cosmic.py/cosmic/types.py/APISpec.assemble/swapped operands of `in`