def METHOD_NAME(self):
    # We could also write this: mtype = cherrypy.lib.accept.accept(...)
    mtype = tools.accept.callable(['text/html', 'text/plain'])
    if mtype == 'text/html':
        return '<h2>Page Title</h2>'
    else:
        return 'PAGE TITLE'