<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def compute_sum_values(i, j, data1, data2):
 """ Return the sum1_ij and sum2_ij values given the input indices and data instances. Notes ----- This is called in `Binning.update_sums` to compute the `sum1` and `sum2` contributions for indices `(i,j)` Parameters i,j : array_like the bin indices for these pairs data1, data2 : `points`, `field` instances the two `points` or `field` objects Returns ------- contributions to sum1, sum2 -- either a float or array """

    sum1_ij = 1.
    for idx, d in zip([i,j], [data1, data2]):
        if isinstance(d, field): sum1_ij *= d.wvalue[idx]
        elif isinstance(d, points): sum1_ij *= d.weights[idx]
        else:
            raise NotImplementedError("data type not recognized")
    sum2_ij = data1.weights[i] * data2.weights[j]

    return sum1_ij, sum2_ij