code: def test_feed_forward_chunking(self):
      for model_class in self.all_model_classes:
          (
              original_config,
              inputs_dict,
          ) = self.model_tester.prepare_config_and_inputs_for_model_class(
              model_class
          )
          torch.manual_seed(0)
          config = copy.deepcopy(original_config)
          model = model_class(config)
          model.to(torch_device)
          model.eval()
  
          hidden_states_no_chunk = model(
              **self._prepare_for_class(inputs_dict, model_class)
          )[0]
  
          torch.manual_seed(0)
          config.chunk_size_feed_forward = 1
          model = model_class(config)
          model.to(torch_device)
          model.eval()
  
          hidden_states_with_chunk = model(
              **self._prepare_for_class(inputs_dict, model_class)
          )[0]
          if (
              model_class.__name__
              == "PerceiverForMultimodalAutoencoding"
          ):
              # model outputs a dictionary with logits for each modality
              for modality in hidden_states_no_chunk.keys():
                  self.assertTrue(
                      torch.allclose(
                          hidden_states_no_chunk[modality],
                          hidden_states_with_chunk[modality],
                          atol=1e-3,
                      )
                  )
          else:
              self.assertTrue(
                  torch.allclose(
                      hidden_states_no_chunk,
                      hidden_states_with_chunk,
                      atol=1e-3,
                  )
              )
  
imports: import copy
  import inspect
  import math
  import tempfile
  import unittest
  import warnings
  from typing import Dict, List, Tuple
  import numpy
  from datasets import load_dataset
  from transformers import PerceiverConfig
  from transformers.models.auto import get_values
  from transformers.testing_utils import require_torch, require_torch_multi_gpu, require_vision, slow, torch_device
  from transformers.utils import is_torch_available, is_vision_available
  from ...test_configuration_common import ConfigTester
  from ...test_modeling_common import ModelTesterMixin, floats_tensor, ids_tensor, random_attention_mask
label_desc: Use image node_id 17 for calling the PerceiverModelTest obj's underlying member method code with example usage: obj.test_feed_forward_chunking() without return types