<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def data_attrs(mapitem):
 """ """

    data_attrs = {}

    try:
        data_attrs['marker-detail-api-url'] = reverse('fluentcms-googlemaps-marker-detail')
    except NoReverseMatch:
        pass

    data_attrs.update(mapitem.get_map_options())
    return mark_safe(u''.join([
        format_html(u' data-{0}="{1}"', k.replace('_', '-'), _data_value(v))
        for k, v in data_attrs.items()
    ]))