<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def apply_widget_template(self, field_name):
 """ Applies widget template overrides if available. The method uses the `get_widget_template` method to determine if the widget template should be exchanged. If a template is available, the template_name property of the widget instance is updated. :param field_name: A field name of the form. """

        field = self.fields[field_name]
        template_name = self.get_widget_template(field_name, field)

        if template_name:
            field.widget.template_name = template_name