def StyleFactory(style_elm):
    style_cls = {
        WD_STYLE_TYPE.PARAGRAPH: _ParagraphStyle,
        WD_STYLE_TYPE.CHARACTER: _CharacterStyle,
        WD_STYLE_TYPE.TABLE:     _TableStyle,
        WD_STYLE_TYPE.LIST:      _NumberingStyle
    }[style_elm.type]

    return style_cls(style_elm)
Return a style object of the appropriate |BaseStyle| subclass, according
dataset/ETHPy150Open python-openxml/python-docx/docx/styles/style.py/StyleFactory