code: def assertTensorTuplesAlmostEqual(
      test, actual, expected, delta=0.0001, mode="sum"
  ):
      if isinstance(expected, tuple):
          assert len(actual) == len(
              expected
          ), f"the length of actual {len(actual)} != expected {len(expected)}"
  
          for i in range(len(expected)):
              assertTensorAlmostEqual(
                  test, actual[i], expected[i], delta, mode
              )
      else:
          assertTensorAlmostEqual(test, actual, expected, delta, mode)
  
file_path: captum/tests/helpers/basic.py
imports: import copy
  import random
  import unittest
  from typing import Callable
  import numpy
  import torch
  from captum.log import patch_methods
label_desc: Use image node_id 3 for calling a global function with example usage: assertTensorTuplesAlmostEqual(test, actual, expected, delta, mode) without return types