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
Return a label to display for a field
dataset/ETHPy150Open torchbox/wagtail/wagtail/contrib/modeladmin/views.py/InspectView.get_field_label