human
Complete this python program:
def login_as_admin(context, admin_name='admin', admin_pass='abc123'):
assistant
#Here is the Python program you requested.

    """Log in as an admin specified by the optional arguments, or create
    such a user and log in if it doesn\t exist.
    :context: a behave context, used for its browser
    :admin_name: optional. username of the admin.
    :admin_pass: optional. password of the admin.
    """
    if (not User.objects.filter(username=admin_name)):
        class ContextWithMixin(CreateAdminMixin, ):
            def __init__(self):
                self.browser = context.browser
        context_wm = ContextWithMixin()
        context_wm.create_admin(username=admin_name, password=admin_pass)
    _login_user(context, admin_name, admin_pass)