code: def __init__(
      self,
      schedule: SampleSchedule,
      trace_logger_class: Type[TraceLogger] = TraceLogger,
      n_rules: int = None,
  ):
      self.schedule = schedule
      self.trace_logger_class = trace_logger_class
      self.n_rules = n_rules
  
file_path: imodels/imodels/experimental/bartpy/samplers/modelsampler.py
imports: import copy
  from collections import defaultdict
  from typing import List, Mapping, Union, Any, Type
  import numpy
  from tqdm import tqdm
  from ..model import Model
  from ..samplers.sampler import Sampler
  from ..samplers.schedule import SampleSchedule
  from ..trace import TraceLogger
label_desc: Use image node_id 1 to create a new ModelSampler object from inherited base classes: Sampler with example: obj = ModelSampler(schedule, trace_logger_class, n_rules)