def METHOD_NAME(a, axis=None):
    """Helper function to calculate variance of sparse matrix by equation: var = mean(a**2) - mean(a)**2"""
    a_squared = a.copy()
    a_squared.data **= 2
    return a_squared.mean(axis) - np.square(a.mean(axis))