code: def unbatch(
      src: Tensor,
      batch: Tensor,
      dim: int = 0,
      batch_size: Optional[int] = None,
  ) -> List[Tensor]:
      r"""Splits :obj:`src` according to a :obj:`batch` vector along dimension
      :obj:`dim`.
  
      Args:
          src (Tensor): The source tensor.
          batch (LongTensor): The batch vector
              :math:`\mathbf{b} \in {\{ 0, \ldots, B-1\}}^N`, which assigns each
              entry in :obj:`src` to a specific example. Must be ordered.
          dim (int, optional): The dimension along which to split the :obj:`src`
              tensor. (default: :obj:`0`)
          batch_size (int, optional): The batch size. (default: :obj:`None`)
  
      :rtype: :class:`List[Tensor]`
  
      Example:
          >>> src = torch.arange(7)
          >>> batch = torch.tensor([0, 0, 0, 1, 1, 2, 2])
          >>> unbatch(src, batch)
          (tensor([0, 1, 2]), tensor([3, 4]), tensor([5, 6]))
      """
      sizes = degree(batch, batch_size, dtype=torch.long).tolist()
      return src.split(sizes, dim)
  
imports: from typing import List, Optional
  import torch
  from torch import Tensor
  from torch_geometric.utils import cumsum, degree
label_desc: Use image node_id 1 for calling a global function with example usage: unbatch(src, batch, dim, batch_size) and returns: src