code: def np_to_torch(array):
      """Numpy arrays to PyTorch tensors.
  
      Args:
          array (np.ndarray): Data in numpy array.
  
      Returns:
          torch.Tensor: float tensor on the global device.
  
      """
      tensor = torch.from_numpy(array)
  
      if tensor.dtype != torch.float32:
          tensor = tensor.float()
  
      return tensor.to(global_device())
  
imports: import copy
  import math
  import warnings
  import torch
  from torch import nn
  import torch.nn.functional
label_desc: Use image node_id 5 for calling a global function with example usage: np_to_torch(array) and returns: tensor