def test_multiPartExtended(self):
        """
        When passed a I{multipart/*} message and C{True} for the C{extended}
        argument, L{imap4.getBodyStructure} includes extended structure
        information from the parts of the multipart message and extended
        structure information about the multipart message itself.
        """
        oneSubPart = FakeyMessage({
                b'content-type': b'image/jpeg; x=y',
                b'content-id': b'some kind of id',
                b'content-description': b'great justice',
                b'content-transfer-encoding': b'maximum',
                }, (), b'', b'hello world', 123, None)

        anotherSubPart = FakeyMessage({
                b'content-type': b'text/plain; charset=us-ascii',
                }, (), b'', b'some stuff', 321, None)

        container = FakeyMessage({
                'content-type': 'multipart/related; foo=bar',
                'content-language': 'es',
                'content-location': 'Spain',
                'content-disposition': 'attachment; name=monkeys',
                }, (), b'', b'', 555, [oneSubPart, anotherSubPart])

        self.assertEqual(
            [imap4.getBodyStructure(oneSubPart, extended=True),
             imap4.getBodyStructure(anotherSubPart, extended=True),
             'related', ['foo', 'bar'], ['attachment', ['name', 'monkeys']],
             'es', 'Spain'],
            imap4.getBodyStructure(container, extended=True))

        When passed a I{multipart/*} message and C{True} for the C{extended}
        argument, L{imap4.getBodyStructure} includes extended structure
        information from the parts of the multipart message and extended
        structure information about the multipart message itself.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/test/test_imap.py