code: def repackage_hidden(h):
      """Wraps hidden states in new Tensors,
      to detach them from their history."""
      if isinstance(h, torch.Tensor):
          return h.detach()
      else:
          return tuple(repackage_hidden(v) for v in h)
  
imports: import torch
label_desc: Use image node_id 1 for calling a global function with example usage: repackage_hidden(h) and returns: h, tuple