code: def test_script(self):
      encoder = self._small_encoder()
      scripted = torch.jit.script(encoder)
      tokens = torch.LongTensor([5, 10, 20])
      scripted.extract_features(tokens)
      encoder.eval()
      scripted.eval()
  
      encoder_out = encoder(tokens)
      scripted_out = scripted(tokens)
      assert len(encoder_out) == len(scripted_out)
      for encoder_tensor, scripted_tensor in zip(
          encoder_out, scripted_out
      ):
          self.assertTrue(torch.equal(encoder_tensor, scripted_tensor))
  
file_path: pytext/pytext/models/representations/test/transformer_test.py
imports: import unittest
  import torch
  from pytext.models.representations.transformer import MultiheadSelfAttention, SentenceEncoder, Transformer, TransformerLayer
  from pytext.models.representations.transformer.representation import TransformerRepresentation
label_desc: Use image node_id 4 for calling the SentenceEncoderTest obj's underlying member method code with example usage: obj.test_script() without return types