code: def submodel(self, states=None, obs=None):
          
          # get the reference HMM submodel
          ref = super(SampledHMSM, self).submodel(states=states, obs=obs)
          # get the sample submodels
          samples_sub = [sample.submodel(states=states, obs=obs) for sample in self.samples]
          # new model
          return SampledHMSM(samples_sub, ref=ref, conf=self.conf)
docs: Returns a HMM with restricted state space
  
          Parameters
          ----------
          states : None or int-array
              Hidden states to restrict the model to (if not None).
          obs : None, str or int-array
              Observed states to restrict the model to (if not None).
  
          Returns
          -------
          hmm : HMM
              The restricted HMM.