@classmethod
    def ofType(klass, messages, messageType):
        result = []
        for message in messages:
            if message.get(MESSAGE_TYPE_FIELD) == messageType.message_type:
                result.append(klass(message))
        return result


    # PEP 8 variant:
Find all L{LoggedMessage} of the specified type.
dataset/ETHPy150Open ClusterHQ/eliot/eliot/testing.py/LoggedMessage.ofType