def test_inline_image_with_multiple_ext_definitions(self):
        # Ensure that the image size can be calculated correctly even if the
        # image size ext isn't the first ext in the drawing node
        width_px = 5
        height_px = 10

        document_xml = '''
            <p>
            <r>
              <t>Foo</t>
              <drawing>
                <inline>
                  <graphic>
                    <graphicData>
                      <pic>
                        <blipFill>
                          <blip embed="foobar">
                            <extLst>
                              <ext/>
                            </extLst>
                          </blip>
                        </blipFill>
                        <spPr>
                          <xfrm>
                            <ext cx="{cx}" cy="{cy}"/>
                          </xfrm>
                        </spPr>
                      </pic>
                    </graphicData>
                  </graphic>
                </inline>
              </drawing>
              <t>Bar</t>
            </r>
            </p>
        '''.format(
            cx=width_px * EMUS_PER_PIXEL,
            cy=height_px * EMUS_PER_PIXEL,
        )

        document = WordprocessingDocumentFactory()
        image_url = 'http://google.com/image1.gif'
        document_rels = document.relationship_format.format(
            id='foobar',
            type=ImagePart.relationship_type,
            target=image_url,
            target_mode='External',
        )

        document.add(MainDocumentPart, document_xml, document_rels)

        expected_html = '''
            <p>
              Foo
              <img
                height="{height}px"
                src="http://google.com/image1.gif"
                width="{width}px"
              />
              Bar
            </p>
        '''.format(width=width_px, height=height_px)

        self.assert_document_generates_html(document, expected_html)
dataset/ETHPy150Open CenterForOpenScience/pydocx/tests/export/html/test_drawing_graphic_blip.py/DrawingGraphicBlipTestCase.test_inline_image_with_multiple_ext_definitions/original