human
Write me a the Python code you requested given the following:
Complete the below
def can_load_page(func):

    ''''Decorator that specifies if user can expect page loading from
    this action. If expect_loading is set to True, ghost will wait
    for page_loaded event.'
    '''
assistant
#Here is the Python code you requested.
    @wraps(func)
    def wrapper(self, *args, **kwargs):
        expect_loading = kwargs.pop('expect_loading', False)
        timeout = kwargs.pop('timeout', None)
        if expect_loading:
            self.loaded = False
            func(self, *args, **kwargs)
            return self.wait_for_page_loaded(timeout=timeout)
        return func(self, *args, **kwargs)
    return wrapper