torch.jit.ignore
torch.jit.ignore(drop=False, **kwargs)
This decorator indicates to the compiler that a function or method
   should be ignored and left as a Python function. This allows you to
   leave code in your model that is not yet TorchScript compatible. If
   called from TorchScript, ignored functions will dispatch the call
   to the Python interpreter. Models with ignored functions cannot be
   exported; use "@torch.jit.unused" instead.
Example (using "@torch.jit.ignore" on a method):
  import torch
  import torch.nn as nn

  class MyModule(nn.Module):
      @torch.jit.ignore
      def debugger(self, x):
          import pdb
          pdb.set_trace()

      def forward(self, x):
          x += 10
          # The compiler would normally try to compile `debugger`,
          # but since it is `@ignore`d, it will be left as a call
          # to Python
          self.debugger(x)
          return x
