<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_mimetype(self):
 """ Use the ending of the template name to infer response's Content-Type header. """

        template_name = self.get_template_names()[0]
        for extension, mimetype in turrentine_settings.TURRENTINE_MIMETYPE_EXTENSIONS:
            if template_name.endswith(extension):
                return mimetype
        return 'text/html'