<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_template_names(self):
 """Returns the template name to use for this request."""

        if self.request.is_ajax():
            template = self.ajax_template_name
        else:
            template = self.template_name
        return template