code: def __init__(
      self,
      batch_size: int,
      max_length: int,
      tokenizer: CPMBeeTokenizer,
      max_depth: int = 16,
  ) -> None:
      self._batch_size = batch_size
      self._max_length = max_length
      self._max_depth = max_depth
      self.tokenizer = tokenizer
      self._transform_func_table: Dict[str, _TransformFuncDict] = {}
  
      self._inputs: List[NDArray[np.int32]] = []
      self._inputs_sub: List[NDArray[np.int32]] = []
      self._context: List[NDArray[np.int8]] = []
      self._sample_ids: List[NDArray[np.int32]] = []
      self._segments: List[NDArray[np.int32]] = []
      self._num_segments: List[NDArray[np.int32]] = []
      self._segment_rel_offset: List[NDArray[np.int32]] = []
      self._segment_rel: List[NDArray[np.int32]] = []
      self._spans: List[List[int]] = []
      self._task_ids: List[List[str]] = []
      self._raw_data: List[List[Any]] = []
  
imports: from collections import OrderedDict
  import multiprocessing
  import os
  from queue import Empty
  from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Union
  from typing_extensions import TypedDict
  from ...dataset import DistributedDataset
  from ...tokenizers import CPMBeeTokenizer
  from ...utils.config import load_dataset_config
  import numpy
  import time
  from numpy.typing import NDArray
  import torch
  import bmtrain
  import importlib.machinery
  import importlib.util
  import types
  import random
label_desc: Use image node_id 1 to create a new _MixedDatasetBatchPacker object  with example: obj = _MixedDatasetBatchPacker(batch_size, max_length, tokenizer, max_depth)