class_docstr: data batch
code: def __call__(self, batch):
      # todo：support batch operators
      data_dict = defaultdict(list)
      to_tensor_keys = []
      for sample in batch:
          for k, v in sample.items():
              if isinstance(
                  v, (np.ndarray, paddle.Tensor, numbers.Number)
              ):
                  if k not in to_tensor_keys:
                      to_tensor_keys.append(k)
              data_dict[k].append(v)
      for k in to_tensor_keys:
          data_dict[k] = paddle.to_tensor(data_dict[k])
      return data_dict
  
file_path: PaddleOCR/ppocr/data/collate_fn.py
imports: import paddle
  import numbers
  import numpy
  from collections import defaultdict
label_desc: Use image node_id 1 for calling the DictCollator obj's underlying member method code with example usage: obj.__call__(batch) and returns: data_dict