<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_genericpage(cls, kb_app):
 """ Return the one class if configured, otherwise default """


        # Presumes the registry has been committed
        q = dectate.Query('genericpage')
        klasses = sorted(q(kb_app), key=lambda args: args[0].order)
        if not klasses:
            # The site doesn't configure a genericpage,
            return Genericpage
        else:
            return klasses[0][1]