<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def loo_compare(psisloo1, psisloo2):
 """ Compares two models using pointwise approximate leave-one-out cross validation. For the method to be valid, the two models should have been fit on the same input data. Parameters psisloo1 : Psisloo object for model1 psisloo2 : Psisloo object for model2 Returns Dict with two values: diff: difference in elpd (estimated log predictive density) between two models, where a positive value indicates that model2 is a better fit than model1. se_diff: estimated standard error of the difference between model2 & model1. """

    ## TODO: confirm that dimensions for psisloo1 & psisloo2 are the same
    loores = psisloo1.pointwise.join(
        psisloo2.pointwise,
        lsuffix = '_m1',
        rsuffix = '_m2')

    loores['pw_diff'] = loores.pointwise_elpd_m2 - loores.pointwise_elpd_m1

    sum_elpd_diff = loores.apply(numpy.sum).pw_diff
    sd_elpd_diff = loores.apply(numpy.std).pw_diff

    elpd_diff = {
        'diff' : sum_elpd_diff,
        'se_diff' : math.sqrt(len(loores.pw_diff)) * sd_elpd_diff
        }
    
    return elpd_diff