<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_locals(cls, session, **kwargs):
 """ Get all local users. :param session: SQLAlchemy session :type session: :class:`sqlalchemy.Session` :return: local users :rtype: generator of :class:`pyshop.models.User` """

        return cls.find(session,
                        where=(cls.local == True,),
                        order_by=cls.login,
                        **kwargs)