code: def from_config(cls, cp, model, nprocesses=1, use_mpi=False):
          
          section = "sampler"
          # check name
          assert cp.get(section, "name") == cls.name, (
              "name in section [sampler] must match mine")
          # get the number of walkers to use
          nwalkers = int(cp.get(section, "nwalkers"))
          # get the checkpoint interval, if it's specified
          checkpoint_interval = cls.checkpoint_from_config(cp, section)
          checkpoint_signal = cls.ckpt_signal_from_config(cp, section)
          # get the logpost function
          lnpost = get_optional_arg_from_config(cp, section, 'logpost-function')
          obj = cls(model, nwalkers,
                    checkpoint_interval=checkpoint_interval,
                    checkpoint_signal=checkpoint_signal,
                    logpost_function=lnpost, nprocesses=nprocesses,
                    use_mpi=use_mpi)
          # set target
          obj.set_target_from_config(cp, section)
          # add burn-in if it's specified
          obj.set_burn_in_from_config(cp)
          # set prethin options
          obj.set_thin_interval_from_config(cp, section)
          return obj
docs: Loads the sampler from the given config file.