<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def by_maintainer(cls, session, maintainer_name):
 """ Get package from a given maintainer name. :param session: SQLAlchemy session :type session: :class:`sqlalchemy.Session` :param maintainer_name: maintainer username :type maintainer_name: unicode :return: package instances :rtype: generator of :class:`pyshop.models.Package` """

        return cls.find(session,
                        join=(cls.maintainers),
                        where=(User.login == maintainer_name,),
                        order_by=cls.name)