code: def split_by_dtype(tensor_list):
      """
      Splits a list of PyTorch tensors into sublists based on their data type.
  
      :param tensor_list: A list of PyTorch tensors.
      :type tensor_list: list[torch.Tensor]
      :return: A list of sublists, where each sublist contains tensors of a specific data type.
      :rtype: list[list[torch.Tensor]]
      """
      dtypes = [
          "torch.cuda.HalfTensor",
          "torch.cuda.FloatTensor",
          "torch.cuda.DoubleTensor",
          "torch.cuda.BFloat16Tensor",
      ]
      buckets = []
      for _, dtype in enumerate(dtypes):
          bucket = [t for t in tensor_list if t.type() == dtype]
          if bucket:
              buckets.append(bucket)
      return buckets
  
file_path: ColossalAI/colossalai/zero/low_level/_utils.py
imports: import math
  from typing import Optional
  import torch
  import torch.distributed
  from torch._utils import _flatten_dense_tensors, _unflatten_dense_tensors
label_desc: Use image node_id 9 for calling a global function with example usage: split_by_dtype(tensor_list) and returns: buckets