code: def dict_to_tensor(batch: Dict[str, np.ndarray], device: str = "cpu"):
      return {k: torch.tensor(v).to(device) for k, v in batch.items()}
  
file_path: ReAgent/reagent/core/torch_utils.py
imports: from io import BytesIO
  from typing import Dict, List
  import numpy
  import torch
  from torchrec.sparse.jagged_tensor import JaggedTensor, KeyedJaggedTensor
label_desc: Use image node_id 1 for calling a global function with example usage: dict_to_tensor(batch, device) and returns: unknown