def METHOD_NAME(self, obj):
    if settings.SPLIT_DIVES_CATEGORIES_BY_PRACTICE and obj.practice:
        data = {
            'id': obj.prefixed_category_id,
            'label': obj.practice.name,
            'pictogram': obj.practice.get_pictogram_url(),
            'slug': obj.practice.slug,
        }
    else:
        data = {
            'id': obj.prefixed_category_id,
            'label': _("Dive"),
            'pictogram': '/static/diving/dive.svg',
            # Translators: This is a slug (without space, accent or special char)
            'slug': _('dive'),
        }
    if settings.SPLIT_DIVES_CATEGORIES_BY_PRACTICE:
        data['order'] = obj.practice and obj.practice.order
    else:
        data['order'] = settings.DIVE_CATEGORY_ORDER
    return data