code: def test_torch_layers_scripting():
      if not is_backend_tested("torch"):
          pytest.skip()
      else:
          import torch
  
          for script_layer in [False, True]:
              model1 = create_torch_model(
                  use_reduce=True, add_scripted_layer=script_layer
              )
              model2 = torch.jit.script(model1)
              input = torch.randn([10, 3, 32, 32])
  
              torch.testing.assert_close(
                  model1(input), model2(input), atol=1e-3, rtol=1e-3
              )
  
file_path: einops/tests/test_layers.py
imports: import pickle
  import tempfile
  from collections import namedtuple
  import numpy
  import pytest
  from einops import rearrange, reduce
  from .None import collect_test_backends, is_backend_tested, FLOAT_REDUCTIONS
label_desc: Use image node_id 7 for calling a global function with example usage: test_torch_layers_scripting() without return types