"ScriptFunction" by compiling the body of the function.
  Example (scripting a function):

     import torch

     @torch.jit.script
     def foo(x, y):
         if x.max() > y.max():
             r = x
         else:
             r = y
         return r

     print(type(foo))  # torch.jit.ScriptFunction

     # See the compiled graph as Python code
     print(foo.code)

     # Call the function using the TorchScript interpreter
     foo(torch.ones(2, 2), torch.ones(2, 2))

**Scripting a function using example_inputs
      Example inputs can be used to annotate a function arguments.
  Example (annotating a function before scripting):

     import torch

     def test_sum(a, b):
         return a + b

     # Annotate the arguments to be int
     scripted_fn = torch.jit.script(test_sum, example_inputs=[(3, 4)])

     print(type(scripted_fn))  # torch.jit.ScriptFunction
