def JSONrepr(self):
        for k, (_, required) in self.props.items():
            if required and self.properties not in k:
                rtype = getattr(self, 'resource_type', "<unknown type>")
                raise ValueError(
                    "Resource %s required in type %s" % (k, rtype))
        self.validate()
        # Mainly used to not have an empty "Properties".
        if self.properties:
            return self.resource
        elif hasattr(self, 'resource_type'):
            d = {}
            for k, v in self.resource.items():
                if k != 'Properties':
                    d[k] = v
            return d
        else:
            return {}
dataset/ETHPy150Open cloudtools/troposphere/troposphere/__init__.py/BaseAWSObject.JSONrepr/swapped operands of `not in`