code: def batchify(
      data: List[dict], device: torch.types.Device = None
  ) -> DataBatch:
      return {
          key: stack(data=[item[key] for item in data], device=device)
          for key in data[0].keys()
      }
  
imports: from typing import List
  import numpy
  import torch
  from gluonts.dataset.common import DataBatch
label_desc: Use image node_id 2 for calling a global function with example usage: batchify(data, device) and returns: unknown