def _get_caption_style(context):
    styles = context['styles']
    caption_style = styles.get('caption')
    if caption_style is not None:
        return caption_style
    caption_style = odf_create_style('graphic', parent=u"Frame",
            **{'style:wrap': u"none", 'style:vertical-pos': u"top",
                'style:vertical-rel': u"paragraph-content",
                'style:horizontal-pos': u"center",
                'style:horizontal-rel': u"paragraph-content",
                'fo:padding': u"0.25cm", 'fo:border': u"0cm solid #000000"})
    context['doc'].insert_style(caption_style, automatic=True)
    styles['caption'] = caption_style
    return caption_style