class_docstr: Wraps an McBackend ``Chain`` as an ``IBaseTrace``.
class_docstr_tok: ["Wraps","an","McBackend","``","Chain","``","as","an","``","IBaseTrace","``","."]
code: def record(
      self,
      draw: Mapping[str, np.ndarray],
      stats: Sequence[Mapping[str, Any]],
  ):
      values = self._point_fn(draw)
      value_dict = {n: v for n, v in zip(self.varnames, values)}
      stats_dict = self._statsbj.map(stats)
      # Apply pickling to objects stats
      for fname in self._statsbj.object_stats.keys():
          val_bytes = pickle.dumps(stats_dict[fname])
          val = base64.encodebytes(val_bytes).decode("ascii")
          stats_dict[fname] = np.array(val, dtype=str)
      return self._chain.append(value_dict, stats_dict)
  
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 2 for calling the ChainRecordAdapter obj's underlying member method code with example usage: obj.record(draw, stats) and returns: self