code: def create_encoder(encoder_type, **encoder_kwargs):
      encoder = encoder_type(**encoder_kwargs)
      return 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 1 for calling a global function with example usage: create_encoder(encoder_type) and returns: encoder