code: def test_hf_auto_transformer_use_pretrained():
      """This test ensures that use_pretrained is always True when using the auto_transformer text encoder even if a
      user explicitly sets it to False."""
      config = {
          "input_features": [
              text_feature(
                  encoder={
                      "type": "auto_transformer",
                      "use_pretrained": False,
                      "pretrained_model_name_or_path": "hf-internal-testing/tiny-random-bloom",
                  },
              )
          ],
          "output_features": [
              category_feature(decoder={"vocab_size": 2})
          ],
      }
  
      model = LudwigModel(config=config, backend=LocalTestBackend())
      assert model.config_obj.input_features[0].encoder.use_pretrained
  
imports: import json
  import os
  from typing import Optional, Type, Union
  from unittest import mock
  import pytest
  import torch
  import ludwig.schema.encoders.utils
  from ludwig.api import LudwigModel
  from ludwig.constants import ENCODER, ENCODER_OUTPUT, MODEL_ECD, NAME, TEXT, TRAINER
  from ludwig.encoders import text_encoders
  from ludwig.error import ConfigValidationError
  from ludwig.globals import MODEL_HYPERPARAMETERS_FILE_NAME
  from ludwig.schema.model_config import ModelConfig
  from ludwig.utils.data_utils import load_json
  from ludwig.utils.torch_utils import get_torch_device
  from tests.integration_tests.parameter_update_utils import check_module_parameters_updated
  from tests.integration_tests.utils import category_feature, clear_huggingface_cache, generate_data, HF_ENCODERS, LocalTestBackend, text_feature
label_desc: Use image node_id 9 for calling a global function with example usage: test_hf_auto_transformer_use_pretrained() without return types