<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def list_fonts(self, pattern, max_names):
 """Return a list of font names matching pattern. No more than max_names will be returned."""

        r = request.ListFonts(display = self.display,
                              max_names = max_names,
                              pattern = pattern)
        return r.fonts