code: def set_thin_interval_from_config(self, cp, section):
          
          if cp.has_option(section, "thin-interval"):
              thin_interval = int(cp.get(section, "thin-interval"))
              logging.info("Will thin samples using interval %i", thin_interval)
          else:
              thin_interval = None
          if cp.has_option(section, "max-samples-per-chain"):
              max_samps_per_chain = int(cp.get(section, "max-samples-per-chain"))
              logging.info("Setting max samples per chain to %i",
                           max_samps_per_chain)
          else:
              max_samps_per_chain = None
          # check for consistency
          if thin_interval is not None and max_samps_per_chain is not None:
              raise ValueError("provide either thin-interval or "
                               "max-samples-per-chain, not both")
          # check that the thin interval is < then the checkpoint interval
          if thin_interval is not None and self.checkpoint_interval is not None \
                  and thin_interval >= self.checkpoint_interval:
              raise ValueError("thin interval must be less than the checkpoint "
                               "interval")
          self.thin_interval = thin_interval
          self.max_samples_per_chain = max_samps_per_chain
docs: Sets thinning options from the given config file.