class_docstr: Wraps an McBackend ``Chain`` as an ``IBaseTrace``.
class_docstr_tok: ["Wraps","an","McBackend","``","Chain","``","as","an","``","IBaseTrace","``","."]
docstr: Wraps `self._chain.get_stats` but unpickles automatically.
docstr_tok: ["Wraps","`","self._chain.get_stats","`","but","unpickles","automatically","."]
code: def _get_stats(self, fname: str, slc: slice) -> np.ndarray:
      """Wraps `self._chain.get_stats` but unpickles automatically."""
      values = self._chain.get_stats(fname, slc)
      # Unpickle object stats
      if fname in self._statsbj.object_stats:
          objs = []
          for v in values:
              enc = str(v).encode("ascii")
              str_ = base64.decodebytes(enc)
              obj = pickle.loads(str_)
              objs.append(obj)
          return np.array(objs, dtype=object)
      return values
  
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 5 for calling the ChainRecordAdapter obj's underlying member method code with example usage: obj._get_stats(fname, slc) and returns: values, np