def get_field_label(self, field_name, field=None):
        label = None
        if field is not None:
            label = getattr(field, 'verbose_name', None)
            if label is None:
                label = getattr(field, 'name', None)
        if label is None:
            label = field_name
        return label
>>> t = '<t:button class="primary">Submit</t:button>'
dataset/ETHPy150Open torchbox/wagtail/wagtail/contrib/modeladmin/views.py/InspectView.get_field_label--crossover with--dataset/ETHPy150Open limodou/uliweb/test/test_taglibs.py/test_2