def coreProperties(self, tagname, str_val, attrs=''):
        tmpl = (
            '<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/'
            'package/2006/metadata/core-properties" xmlns:dc="http://purl.or'
            'g/dc/elements/1.1/" xmlns:dcmitype="http://purl.org/dc/dcmitype'
            '/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://'
            'www.w3.org/2001/XMLSchema-instance">%s</cp:coreProperties>\n'
        )
        if not tagname:
            child_element = ''
        elif not str_val:
            child_element = '\n  <%s%s/>\n' % (tagname, attrs)
        else:
            child_element = (
                '\n  <%s%s>%s</%s>\n' % (tagname, attrs, str_val, tagname)
            )
        return child_element % tmpl
dataset/ETHPy150Open scanny/python-pptx/tests/parts/test_coreprops.py/DescribeCoreProperties.coreProperties/swapped operands of `%`