code: def test_image_encoders_mlpmixer():
      # make repeatable
      np.random.seed(RANDOM_SEED)
      torch.manual_seed(RANDOM_SEED)
  
      # Test the resnet encoder for images
      encoder_kwargs = {
          "patch_size": 5,
          "embed_size": 8,
          "token_size": 32,
          "channel_dim": 16,
          "num_layers": 2,
          "dropout": DROPOUT,
      }
      image_size = (3, 10, 10)
  
      output_shape = [1, 8]
      input_image = generate_images(image_size, 1)
  
      encoder = create_encoder(
          MLPMixerEncoder,
          num_channels=image_size[0],
          height=image_size[1],
          width=image_size[2],
          **encoder_kwargs,
      )
      encoder_test(
          encoder=encoder,
          input_data=input_image,
          output_dtype=torch.float32,
          output_shape=output_shape,
          output_data=None,
      )
  
      output_shape = [5, 8]
      input_images = generate_images(image_size, 5)
  
      encoder_test(
          encoder=encoder,
          input_data=input_images,
          output_dtype=torch.float32,
          output_shape=output_shape,
          output_data=None,
      )
  
      assert encoder is not None
      assert encoder.mlp_mixer.__class__.__name__ == "MLPMixer"
      assert len(encoder.mlp_mixer.mixer_blocks) == 2
      assert list(
          encoder.mlp_mixer.mixer_blocks[0].mlp1.output_shape
      ) == [4]
      assert encoder.mlp_mixer.patch_conv.__class__.__name__ == "Conv2d"
      assert encoder.mlp_mixer.patch_conv.kernel_size == (5, 5)
  
      # test for parameter updates
      # generate tensors for parameter update test
      target = torch.rand(output_shape)
      image_tensor = torch.rand(input_image.shape)
  
      # check for parameter updates
      fpc, tpc, upc, not_updated = check_module_parameters_updated(
          encoder, (image_tensor,), target
      )
      assert upc == tpc, (
          f"Not all trainable parameters updated.  Parameters not updated: {not_updated}."
          f"  Module structure\n{encoder}"
      )
  
imports: import random
  import numpy
  import pytest
  import torch
  from ludwig.constants import ENCODER_OUTPUT
  from ludwig.data.dataset_synthesizer import build_vocab
  from ludwig.encoders.base import Encoder
  from ludwig.encoders.image.base import MLPMixerEncoder, Stacked2DCNN
  from ludwig.encoders.sequence_encoders import ParallelCNN, SequenceEmbedEncoder, StackedCNN, StackedCNNRNN, StackedParallelCNN, StackedRNN
  from ludwig.utils.torch_utils import get_torch_device
  from tests.integration_tests.parameter_update_utils import check_module_parameters_updated
label_desc: Use image node_id 8 for calling a global function with example usage: test_image_encoders_mlpmixer() without return types