prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  ThumbnailMixin does not display in header the value defined under thumb_col_header_text 
  <!--
  Found a bug? Please fill out the sections below. 👍
  -->
  
  ### Issue Summary
  
  When adding ThumbnailMixin to a ModelAdmin, and giving it the `thumb_col_header_text` attribute, should display that on the list header for the thumbnail. but it always uses the default defined 'image' 
  
  ![image](https://user-images.githubusercontent.com/4082254/161403611-d75291b5-6db8-413a-82fa-447aab5fe69a.png)
  
  
  ![image](https://user-images.githubusercontent.com/4082254/161403594-1b2bd39b-2332-40a8-b539-cae4d72a57e6.png)
  
  
  
  ### Steps to Reproduce
  
  1. (for example) Start a new project with `wagtail start myproject`
  2. in models.py add a new model (non page) with a forignkey to wagtailimages.Image 
  3. add model admin definition in wagtail_hooks.py
  4. add ThumbnailMixin to model admin super classes
  5. add some value to thumb_col_header_text
  6. register new model admin
  7. load app
  8. add new instance of your new model with an image
  9. in list header for your image it will say 'image' not what you defined in thumb_col_header_text
  
  Any other relevant information. For example, why do you consider this a bug and what did you expect to happen instead?
  
  * I have confirmed that this issue can be reproduced as described on a fresh Wagtail project: (yes)
  * i already know why this is happening and will submit a pull request shortly
  
  
  ### Technical details
  
  * Python version: 3.9.7
  * Django version: 4.0.3
  * Wagtail version: 2.16.1
  * Browser version: Chrome Version 100.0.4896.60 (Official Build) (x86_64)
  
  
  </issue>
  <code>
  [start of wagtail/contrib/modeladmin/mixins.py]
  1 from django.conf import settings
  2 from django.core.exceptions import ImproperlyConfigured
  3 from django.forms.utils import flatatt
  4 from django.utils.safestring import mark_safe
  5 from django.utils.translation import gettext_lazy as _
  6 
  7 
  8 class ThumbnailMixin:
  9     """
  10     Mixin class to help display thumbnail images in ModelAdmin listing results.
  11     `thumb_image_field_name` must be overridden to name a ForeignKey field on
  12     your model, linking to `wagtailimages.Image`.
  13     """
  14 
  15     thumb_image_field_name = "image"
  16     thumb_image_filter_spec = "fill-100x100"
  17     thumb_image_width = 50
  18     thumb_classname = "admin-thumb"
  19     thumb_col_header_text = _("image")
  20     thumb_default = None
  21 
  22     def __init__(self, *args, **kwargs):
  23         if "wagtail.images" not in settings.INSTALLED_APPS:
  24             raise ImproperlyConfigured(
  25                 "The `wagtail.images` app must be installed in order "
  26                 "to use the `ThumbnailMixin` class."
  27             )
  28         super().__init__(*args, **kwargs)
  29 
  30     def admin_thumb(self, obj):
  31         try:
  32             image = getattr(obj, self.thumb_image_field_name, None)
  33         except AttributeError:
  34             raise ImproperlyConfigured(
  35                 "The `thumb_image_field_name` attribute on your `%s` class "
  36                 "must name a field on your model." % self.__class__.__name__
  37             )
  38 
  39         img_attrs = {
  40             "src": self.thumb_default,
  41             "width": self.thumb_image_width,
  42             "class": self.thumb_classname,
  43         }
  44         if not image:
  45             if self.thumb_default:
  46                 return mark_safe("<img{}>".format(flatatt(img_attrs)))
  47             return ""
  48 
  49         # try to get a rendition of the image to use
  50         from wagtail.images.shortcuts import get_rendition_or_not_found
  51 
  52         spec = self.thumb_image_filter_spec
  53         rendition = get_rendition_or_not_found(image, spec)
  54         img_attrs.update({"src": rendition.url})
  55         return mark_safe("<img{}>".format(flatatt(img_attrs)))
  56 
  57     admin_thumb.short_description = thumb_col_header_text
  58
  [end of wagtail/contrib/modeladmin/mixins.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/wagtail/contrib/modeladmin/mixins.py b/wagtail/contrib/modeladmin/mixins.py
  --- a/wagtail/contrib/modeladmin/mixins.py
  +++ b/wagtail/contrib/modeladmin/mixins.py
  @@ -25,6 +25,7 @@
                   "The `wagtail.images` app must be installed in order "
                   "to use the `ThumbnailMixin` class."
               )
  +        self.__class__.admin_thumb.short_description = self.thumb_col_header_text
           super().__init__(*args, **kwargs)
   
       def admin_thumb(self, obj):
  @@ -53,5 +54,3 @@
           rendition = get_rendition_or_not_found(image, spec)
           img_attrs.update({"src": rendition.url})
           return mark_safe("<img{}>".format(flatatt(img_attrs)))
  -
  -    admin_thumb.short_description = thumb_col_header_text
  
verification_info: {"golden_diff": "diff --git a/wagtail/contrib/modeladmin/mixins.py b/wagtail/contrib/modeladmin/mixins.py\n--- a/wagtail/contrib/modeladmin/mixins.py\n+++ b/wagtail/contrib/modeladmin/mixins.py\n@@ -25,6 +25,7 @@\n                 \"The `wagtail.images` app must be installed in order \"\n                 \"to use the `ThumbnailMixin` class.\"\n             )\n+        self.__class__.admin_thumb.short_description = self.thumb_col_header_text\n         super().__init__(*args, **kwargs)\n \n     def admin_thumb(self, obj):\n@@ -53,5 +54,3 @@\n         rendition = get_rendition_or_not_found(image, spec)\n         img_attrs.update({\"src\": rendition.url})\n         return mark_safe(\"<img{}>\".format(flatatt(img_attrs)))\n-\n-    admin_thumb.short_description = thumb_col_header_text\n", "issue": "ThumbnailMixin does not display in header the value defined under thumb_col_header_text \n<!--\r\nFound a bug? Please fill out the sections below. \ud83d\udc4d\r\n-->\r\n\r\n### Issue Summary\r\n\r\nWhen adding ThumbnailMixin to a ModelAdmin, and giving it the `thumb_col_header_text` attribute, should display that on the list header for the thumbnail. but it always uses the default defined 'image' \r\n\r\n![image](https://user-images.githubusercontent.com/4082254/161403611-d75291b5-6db8-413a-82fa-447aab5fe69a.png)\r\n\r\n\r\n![image](https://user-images.githubusercontent.com/4082254/161403594-1b2bd39b-2332-40a8-b539-cae4d72a57e6.png)\r\n\r\n\r\n\r\n### Steps to Reproduce\r\n\r\n1. (for example) Start a new project with `wagtail start myproject`\r\n2. in models.py add a new model (non page) with a forignkey to wagtailimages.Image \r\n3. add model admin definition in wagtail_hooks.py\r\n4. add ThumbnailMixin to model admin super classes\r\n5. add some value to thumb_col_header_text\r\n6. register new model admin\r\n7. load app\r\n8. add new instance of your new model with an image\r\n9. in list header for your image it will say 'image' not what you defined in thumb_col_header_text\r\n\r\nAny other relevant information. For example, why do you consider this a bug and what did you expect to happen instead?\r\n\r\n* I have confirmed that this issue can be reproduced as described on a fresh Wagtail project: (yes)\r\n* i already know why this is happening and will submit a pull request shortly\r\n\r\n\r\n### Technical details\r\n\r\n* Python version: 3.9.7\r\n* Django version: 4.0.3\r\n* Wagtail version: 2.16.1\r\n* Browser version: Chrome Version 100.0.4896.60 (Official Build) (x86_64)\r\n\n", "before_files": [{"content": "from django.conf import settings\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.forms.utils import flatatt\nfrom django.utils.safestring import mark_safe\nfrom django.utils.translation import gettext_lazy as _\n\n\nclass ThumbnailMixin:\n    \"\"\"\n    Mixin class to help display thumbnail images in ModelAdmin listing results.\n    `thumb_image_field_name` must be overridden to name a ForeignKey field on\n    your model, linking to `wagtailimages.Image`.\n    \"\"\"\n\n    thumb_image_field_name = \"image\"\n    thumb_image_filter_spec = \"fill-100x100\"\n    thumb_image_width = 50\n    thumb_classname = \"admin-thumb\"\n    thumb_col_header_text = _(\"image\")\n    thumb_default = None\n\n    def __init__(self, *args, **kwargs):\n        if \"wagtail.images\" not in settings.INSTALLED_APPS:\n            raise ImproperlyConfigured(\n                \"The `wagtail.images` app must be installed in order \"\n                \"to use the `ThumbnailMixin` class.\"\n            )\n        super().__init__(*args, **kwargs)\n\n    def admin_thumb(self, obj):\n        try:\n            image = getattr(obj, self.thumb_image_field_name, None)\n        except AttributeError:\n            raise ImproperlyConfigured(\n                \"The `thumb_image_field_name` attribute on your `%s` class \"\n                \"must name a field on your model.\" % self.__class__.__name__\n            )\n\n        img_attrs = {\n            \"src\": self.thumb_default,\n            \"width\": self.thumb_image_width,\n            \"class\": self.thumb_classname,\n        }\n        if not image:\n            if self.thumb_default:\n                return mark_safe(\"<img{}>\".format(flatatt(img_attrs)))\n            return \"\"\n\n        # try to get a rendition of the image to use\n        from wagtail.images.shortcuts import get_rendition_or_not_found\n\n        spec = self.thumb_image_filter_spec\n        rendition = get_rendition_or_not_found(image, spec)\n        img_attrs.update({\"src\": rendition.url})\n        return mark_safe(\"<img{}>\".format(flatatt(img_attrs)))\n\n    admin_thumb.short_description = thumb_col_header_text\n", "path": "wagtail/contrib/modeladmin/mixins.py"}]}