@classmethod
    def from_dict(cls, payload_dict):
        '''Re-create object from dictionary'''
        if payload_dict not in 'PayloadType':
            raise KeyError('Payload MUST contain PayloadType key')

        pldcls = find_payload_class(payload_dict['PayloadType'])

        if pldcls:
            pld = pldcls.__new__(pldcls)
        else:
            pld = Payload.__new__(Payload)

        pld.payload = payload_dict
        return pld
dataset/ETHPy150Open jessepeterson/commandment/commandment/profiles/__init__.py/Payload.from_dict/swapped operands of `not in`