code: def get_state(self):
          
  
          self.step_methods = set()
          for s in self.stochastics:
              self.step_methods |= set(self.step_method_dict[s])
  
          state = Sampler.get_state(self)
          state['step_methods'] = {}
  
          # The state of each StepMethod.
          for sm in self.step_methods:
              state['step_methods'][sm._id] = sm.current_state().copy()
  
          return state
docs: Return the sampler and step methods current state in order to
          restart sampling at a later time.