code: def to_iter(data_loader):
      # TODO: not sure how to make this cleaner
      for x, y in data_loader:
          # if it's not multi input
          # NOTE: torch.utils.data.DataLoader returns a list in this case
          if not isinstance(x, list):
              x = (x,)
          yield Batch(inputs=tuple(x), labels=y)
  
imports: import unittest
  from typing import Callable, List, Union
  import torch
  import torch.nn
  from captum.insights import AttributionVisualizer, Batch
  from captum.insights.attr_vis.app import FilterConfig
  from captum.insights.attr_vis.features import BaseFeature, FeatureOutput, ImageFeature
  from tests.helpers.basic import BaseTest
label_desc: Use image node_id 6 for calling a global function with example usage: to_iter(data_loader) without return types