code: def init_traces(
      *,
      backend: Optional[TraceOrBackend],
      chains: int,
      expected_length: int,
      step: Union[BlockedStep, CompoundStep],
      initial_point: Mapping[str, np.ndarray],
      model: Model,
  ) -> Tuple[Optional[RunType], Sequence[IBaseTrace]]:
      """Initializes a trace recorder for each chain."""
      if HAS_MCB and isinstance(backend, Backend):
          return init_chain_adapters(
              backend=backend,
              chains=chains,
              initial_point=initial_point,
              step=step,
              model=model,
          )
  
      assert backend is None or isinstance(backend, BaseTrace)
      traces = [
          _init_trace(
              expected_length=expected_length,
              stats_dtypes=step.stats_dtypes,
              chain_number=chain_number,
              trace=backend,
              model=model,
          )
          for chain_number in range(chains)
      ]
      return None, traces
  
file_path: pymc/pymc/backends/__init__.py
imports: from copy import copy
  from typing import Dict, List, Mapping, Optional, Sequence, Tuple, Union
  import numpy
  from typing_extensions import TypeAlias
  from pymc.backends.arviz import predictions_to_inference_data, to_inference_data
  from pymc.backends.base import BaseTrace, IBaseTrace
  from pymc.backends.ndarray import NDArray
  from pymc.model import Model
  from pymc.step_methods.compound import BlockedStep, CompoundStep
label_desc: Use image node_id 2 for calling a global function with example usage: init_traces() and returns: None,  traces, init_chain_adapters