class_docstr: Base trace object
  
  Parameters
  ----------
  name: str
      Name of backend
  model: Model
      If None, the model is taken from the `with` context.
  vars: list of variables
      Sampling values will be stored for these variables. If None,
      `model.unobserved_RVs` is used.
  test_point: dict
      use different test point that might be with changed variables shapes
class_docstr_tok: ["Base","trace","object","Parameters","--","--","--","--","--","name",":","str","Name","of","backend","model",":","Model","If","None",",","the","model","is","taken","from","the","`","with","`","context",".","vars",":","list","of","variables","Sampling","values","will","be","stored","for","these","variables",".","If","None",",","`","model.unobserved_RVs","`","is","used",".","test_point",":","dict","use","different","test","point","that","might","be","with","changed","variables","shapes"]
code: def __init__(self, name, model=None, vars=None, test_point=None):
      self.name = name
  
      model = modelcontext(model)
      self.model = model
      if vars is None:
          vars = model.unobserved_value_vars
  
      unnamed_vars = {var for var in vars if var.name is None}
      if unnamed_vars:
          raise Exception(
              f"Can't trace unnamed variables: {unnamed_vars}"
          )
      self.vars = vars
      self.varnames = [var.name for var in vars]
      self.fn = model.compile_fn(
          vars, inputs=model.value_vars, on_unused_input="ignore"
      )
  
      # Get variable shapes. Most backends will need this
      # information.
      if test_point is None:
          test_point = model.initial_point()
      else:
          test_point_ = model.initial_point().copy()
          test_point_.update(test_point)
          test_point = test_point_
      var_values = list(zip(self.varnames, self.fn(test_point)))
      self.var_shapes = {var: value.shape for var, value in var_values}
      self.var_dtypes = {var: value.dtype for var, value in var_values}
      self.chain = None
      self._is_base_setup = False
      self.sampler_vars = None
  
imports: import itertools
  import logging
  import warnings
  from abc import ABC
  from typing import Any, Dict, List, Mapping, Optional, Sequence, Set, Sized, Tuple, TypeVar, Union, cast
  import numpy
  from pymc.backends.report import SamplerReport
  from pymc.model import modelcontext
  from pymc.util import get_var_name
label_desc: Use image node_id 1 to create a new BaseTrace object from inherited base classes: IBaseTrace with example: obj = BaseTrace(name, model, vars, test_point)