code: def test_from_model_config(self):
      model_config = AutoConfig.from_pretrained("gpt2")
      generation_config_from_model = GenerationConfig.from_model_config(
          model_config
      )
      default_generation_config = GenerationConfig()
  
      # The generation config has loaded a few non-default parameters from the model config
      self.assertNotEqual(
          generation_config_from_model, default_generation_config
      )
  
      # One of those parameters is eos_token_id -- check if it matches
      self.assertNotEqual(
          generation_config_from_model.eos_token_id,
          default_generation_config.eos_token_id,
      )
      self.assertEqual(
          generation_config_from_model.eos_token_id,
          model_config.eos_token_id,
      )
  
imports: import copy
  import os
  import tempfile
  import unittest
  import warnings
  from huggingface_hub import HfFolder, delete_repo
  from parameterized import parameterized
  from requests.exceptions import HTTPError
  from transformers import AutoConfig, GenerationConfig
  from transformers.testing_utils import TOKEN, USER, is_staging_test
label_desc: Use image node_id 2 for calling the GenerationConfigTest obj's underlying member method code with example usage: obj.test_from_model_config() without return types