code: def test_auto_wrap_hf_model(self):
      with enable_wrap(
          wrapper_cls=FSDP, auto_wrap_policy=wrap_transformer_only
      ):
          self.model = auto_wrap(self.model)
  
      self.model = FSDP(self.model)
  
      self.assertTrue(
          isinstance(self.model.transformer, FSDP),
          "Transformer should have been wrapped with FSDP",
      )
  
      source_seq, target_seq = self.model.generate_random_sequences()
      source_seq = source_seq.to(self.device)
      target_seq = target_seq.to(self.device)
  
      print("Evaluating model ...")
      # This should not fail
      self.model(source_seq, target_seq)
  
imports: from collections import OrderedDict
  from dataclasses import dataclass
  import tempfile
  import unittest
  import torch
  from torch import nn
  from fairscale.fair_dev.testing.testing import dist_init
  from fairscale.nn import FullyShardedDataParallel
  from fairscale.nn import auto_wrap, enable_wrap
label_desc: Use image node_id 2 for calling the TestHFTransformersAutoWrap obj's underlying member method code with example usage: obj.test_auto_wrap_hf_model() without return types