def can_include_property(self, name):
        # empty schema "{}" allows all properties
        if not self._schema:
            return True

        # only objects can have properties
        if self.type not in 'object':
            return False

        try:
            property_schema = self._schema['properties'][name]

            if property_schema.get('readOnly', False):
                return False

            return True
        except KeyError:
            if self._schema.get('additionalProperties', True):
                return True

            for pattern in self._schema.get('patternProperties', {}).values():
                if re.match(pattern, name):
                    return True

            return False
dataset/ETHPy150Open biosustain/potion-client/potion_client/schema.py/Schema.can_include_property/swapped operands of `not in`