class_docstr: Wraps an McBackend ``Chain`` as an ``IBaseTrace``.
class_docstr_tok: ["Wraps","an","McBackend","``","Chain","``","as","an","``","IBaseTrace","``","."]
code: def __init__(
      self,
      chain: mcb.Chain,
      point_fn: PointFunc,
      stats_bijection: StatsBijection,
  ) -> None:
      # Assign attributes required by IBaseTrace
      self.chain = chain.cmeta.chain_number
      self.varnames = [v.name for v in chain.rmeta.variables]
      stats_dtypes = {
          s.name: np.dtype(s.dtype) for s in chain.rmeta.sample_stats
      }
      self.sampler_vars = [
          {
              sname: stats_dtypes[fname]
              for fname, sname, is_obj in sstats
          }
          for sstats in stats_bijection._stat_groups
      ]
  
      self._chain = chain
      self._point_fn = point_fn
      self._statsbj = stats_bijection
      super().__init__()
  
imports: import base64
  import logging
  import pickle
  from typing import Any, Dict, List, Mapping, Optional, Sequence, Tuple, Union, cast
  import hagelkorn
  import mcbackend
  import numpy
  from mcbackend.npproto.utils import ndarray_from_numpy
  from pytensor.compile.sharedvalue import SharedVariable
  from pytensor.graph.basic import Constant
  from pymc.backends.base import IBaseTrace
  from pymc.model import Model
  from pymc.pytensorf import PointFunc
  from pymc.step_methods.compound import BlockedStep, CompoundStep, StatsBijection, check_step_emits_tune, flat_statname, flatten_steps
label_desc: Use image node_id 1 to create a new ChainRecordAdapter object from inherited base classes: IBaseTrace with example: obj = ChainRecordAdapter(chain, point_fn, stats_bijection)