code: def _assert_embeddings_equal(
      self,
      input,
      output,
      interpretable_embedding,
      embedding_dim=None,
      num_embeddings=None,
  ):
      if interpretable_embedding.embedding_dim is not None:
          self.assertEqual(
              embedding_dim, interpretable_embedding.embedding_dim
          )
          self.assertEqual(
              num_embeddings, interpretable_embedding.num_embeddings
          )
  
      # dim - [4, 100]
      emb_shape = interpretable_embedding.indices_to_embeddings(
          input
      ).shape
      self.assertEqual(emb_shape[0], input.shape[0])
      if interpretable_embedding.embedding_dim is not None:
          self.assertEqual(
              emb_shape[1], interpretable_embedding.embedding_dim
          )
      self.assertEqual(input.shape[0], output.shape[0])
  
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 4 for calling the Test obj's underlying member method code with example usage: obj._assert_embeddings_equal(input, output, interpretable_embedding, embedding_dim, num_embeddings) without return types