code: def restricted_loads(s):
      result = RestrictedUnpickler(io.BytesIO(s)).load()
      if torch.is_tensor(result) or isinstance(result, torch.nn.Module):
          _check_hooks_are_valid(result, "_backward_hooks")
      return result
  
file_path: CrypTen/crypten/common/serial.py
imports: import builtins
  import collections
  import inspect
  import io
  import logging
  import pickle
  import torch
label_desc: Use image node_id 6 for calling a global function with example usage: restricted_loads(s) and returns: result