code: def test_nested_multi_embeddings(self) -> None:
      input1 = torch.tensor([[3, 2, 0], [1, 2, 4]])
      input2 = torch.tensor([[0, 1, 0], [2, 6, 8]])
      input3 = torch.tensor([[4, 1, 0], [2, 2, 8]])
      model = BasicEmbeddingModel(nested_second_embedding=True)
      output = model(input1, input2, input3)
      expected = model.embedding2(input=input2, another_input=input3)
      # in this case we make interpretable the custom embedding layer - TextModule
      interpretable_embedding2 = (
          configure_interpretable_embedding_layer(model, "embedding2")
      )
      actual = interpretable_embedding2.indices_to_embeddings(
          input=input2, another_input=input3
      )
      output_interpretable_models = model(input1, actual)
      assertTensorAlmostEqual(
          self,
          output,
          output_interpretable_models,
          delta=0.05,
          mode="max",
      )
  
      assertTensorAlmostEqual(
          self, expected, actual, delta=0.0, mode="max"
      )
      self.assertTrue(
          model.embedding2.__class__ is InterpretableEmbeddingBase
      )
      remove_interpretable_embedding_layer(
          model, interpretable_embedding2
      )
      self.assertTrue(model.embedding2.__class__ is TextModule)
      self._assert_embeddings_equal(
          input2, output, interpretable_embedding2
      )
  
file_path: captum/tests/attr/models/test_base.py
imports: from __future__ import print_function
  import unittest
  import torch
  from captum.attr._models.base import configure_interpretable_embedding_layer, InterpretableEmbeddingBase, remove_interpretable_embedding_layer
  from tests.helpers.basic import assertTensorAlmostEqual
  from tests.helpers.basic_models import BasicEmbeddingModel, TextModule
  from torch.nn import Embedding
label_desc: Use image node_id 3 for calling the Test obj's underlying member method code with example usage: obj.test_nested_multi_embeddings() without return types