code: def alt_perturb_generator(
      original_inp: TensorOrTupleOfTensorsGeneric, **kwargs
  ) -> Generator[TensorOrTupleOfTensorsGeneric, None, None]:
      while True:
          yield alt_perturb_func(original_inp, **kwargs)
  
imports: import io
  import unittest
  import unittest.mock
  from functools import partial
  from typing import Any, Callable, Generator, List, Optional, Tuple, Union
  import torch
  from captum._utils.models.linear_model import SGDLasso, SkLearnLasso
  from captum._utils.models.model import Model
  from captum._utils.typing import BaselineType, TensorOrTupleOfTensorsGeneric
  from captum.attr._core.lime import get_exp_kernel_similarity_function, Lime, LimeBase
  from captum.attr._utils.batching import _batch_example_iterator
  from captum.attr._utils.common import _construct_default_feature_mask, _format_input_baseline, _format_tensor_into_tuples
  from tests.helpers.basic import assertTensorAlmostEqual, assertTensorTuplesAlmostEqual, BaseTest
  from tests.helpers.basic_models import BasicLinearModel, BasicModel_MultiLayer, BasicModel_MultiLayer_MultiInput, BasicModelBoolInput
  from torch import Tensor
label_desc: Use image node_id 2 for calling a global function with example usage: alt_perturb_generator(original_inp) without return types