python / flask: How to run a function whenever another is called

from flask_login import login_user as login_user__

def run_first(fun):
    def inner(*args):
        when_login() # add arguments you want for making this call
    return inner

def when_login(*args):
    print('processing something with args in when_login')

def login_user(*args):
    print('login_user is running first')
    return login_user__(*args)

login_user() # call this however you normally use
login_user is running first
processing something with args in when_login