code: def to_numpy(*args):
      """Convert a sequence which might contain Tensors to numpy arrays."""
      if len(args) == 1:
          arg = args[0]
          if isinstance(arg, torch.Tensor):
              arg = _to_numpy_single(arg)
          return arg
      else:
          return tuple(
              _to_numpy_single(arg)
              if isinstance(arg, torch.Tensor)
              else arg
              for arg in args
          )
  
file_path: torchsde/diagnostics/utils.py
imports: import itertools
  import os
  import random
  import matplotlib.pyplot
  import numpy
  import torch
  from scipy import stats
  from torchsde.types import Optional, Tensor, Sequence, Union, Callable
label_desc: Use image node_id 1 for calling a global function with example usage: to_numpy() and returns: arg, tuple