code: def test_tv_convnext_encoder(
      model_variant: int,
      use_pretrained: bool,
      saved_weights_in_checkpoint: bool,
      trainable: bool,
  ):
      # make repeatable
      set_random_seed(RANDOM_SEED)
  
      pretrained_model = TVConvNeXtEncoder(
          model_variant=model_variant,
          use_pretrained=use_pretrained,
          saved_weights_in_checkpoint=saved_weights_in_checkpoint,
          trainable=trainable,
      )
      inputs = torch.rand(2, *pretrained_model.input_shape)
      outputs = pretrained_model(inputs)
      assert (
          outputs[ENCODER_OUTPUT].shape[1:]
          == pretrained_model.output_shape
      )
  
imports: from typing import Union
  import pytest
  import torch
  from ludwig.constants import ENCODER_OUTPUT
  from ludwig.encoders.image.base import MLPMixerEncoder, ResNetEncoder, Stacked2DCNN, ViTEncoder
  from ludwig.encoders.image.torchvision import TVAlexNetEncoder, TVConvNeXtEncoder, TVDenseNetEncoder, TVEfficientNetEncoder, TVGoogLeNetEncoder, TVInceptionV3Encoder, TVMaxVitEncoder, TVMNASNetEncoder, TVMobileNetV2Encoder, TVMobileNetV3Encoder, TVRegNetEncoder, TVResNetEncoder, TVResNeXtEncoder, TVShuffleNetV2Encoder, TVSqueezeNetEncoder, TVSwinTransformerEncoder, TVVGGEncoder, TVViTEncoder, TVWideResNetEncoder
  from ludwig.utils.image_utils import torchvision_model_registry
  from ludwig.utils.misc_utils import set_random_seed
  from tests.integration_tests.parameter_update_utils import check_module_parameters_updated
label_desc: Use image node_id 6 for calling a global function with example usage: test_tv_convnext_encoder(model_variant, use_pretrained, saved_weights_in_checkpoint, trainable) without return types