code: def test_no_peft(self):
      with patch.dict(sys.modules, {"peft": None}):
          from trl import (
              AutoModelForCausalLMWithValueHead,
              AutoModelForSeq2SeqLMWithValueHead,
          )
  
          # Check that loading a model with `peft` will raise an error
          with self.assertRaises(ModuleNotFoundError):
              import peft  # noqa
  
          trl_model = AutoModelForCausalLMWithValueHead.from_pretrained(
              self.causal_lm_model_id
          )  # noqa
          trl_seq2seq_model = (
              AutoModelForSeq2SeqLMWithValueHead.from_pretrained(
                  self.seq_to_seq_model_id
              )
          )
  
file_path: trl/tests/test_no_peft.py
imports: import sys
  import unittest
  from unittest.mock import patch
  import torch
  from transformers import AutoModelForCausalLM, AutoTokenizer
  from .testing_utils import is_peft_available, require_peft
label_desc: Use image node_id 2 for calling the TestPeftDependancy obj's underlying member method code with example usage: obj.test_no_peft() without return types