code: def compute_error(
      y11: TensorOrTensors, y12: TensorOrTensors, rtol, atol, eps=1e-7
  ):
      """Computer error estimate.
  
      Args:
          y11: A tensor or a sequence of tensors obtained with a full update.
          y12: A tensor or a sequence of tensors obtained with two half updates.
          rtol: Relative tolerance.
          atol: Absolute tolerance.
          eps: A small constant to avoid division by zero.
  
      Returns:
          A float for the aggregated error estimate.
      """
      if torch.is_tensor(y11):
          y11 = (y11,)
      if torch.is_tensor(y12):
          y12 = (y12,)
      tol = [
          (
              rtol * torch.max(torch.abs(y11_), torch.abs(y12_)) + atol
          ).clamp_min(eps)
          for y11_, y12_ in zip(y11, y12)
      ]
      error_estimate = _rms(
          [
              (y11_ - y12_) / tol_
              for y11_, y12_, tol_ in zip(y11, y12, tol)
          ],
          eps,
      )
      assert not misc.is_nan(
          error_estimate
      ), "Found nans in the error estimate. Try increasing the tolerance or regularizing the dynamics."
      return error_estimate.detach().cpu().item()
  
imports: import torch
  from .None import misc
  from ..types import TensorOrTensors
label_desc: Use image node_id 2 for calling a global function with example usage: compute_error(y11, y12, rtol, atol, eps) and returns: error_estimate