def METHOD_NAME(self, u, uh, celltype=False, q=None):
    mesh = self.mesh
    NE = mesh.number_of_edges()
    node = mesh.entity('node')
    edge = mesh.entity('edge')
    p = uh.space.p
    qf = self.edgeintegrator if q is None else GaussLegendreQuadrature(p + 3)
    bcs, ws = qf.quadpts, qf.weights
    ps = np.einsum('ij, kjm->ikm', bcs, node[edge])
    val = u(ps) - uh.edge_value(bcs)
    e = np.sqrt(np.sum(
            np.einsum(
                'i, ij..., ij..., j->...', ws, val, val, self.edgemeasure
                )/NE)
            )
    return e