code: def set_target_from_config(self, cp, section):
          
          if cp.has_option(section, "niterations"):
              niterations = int(cp.get(section, "niterations"))
          else:
              niterations = None
          if cp.has_option(section, "effective-nsamples"):
              nsamples = int(cp.get(section, "effective-nsamples"))
          else:
              nsamples = None
          self.set_target(niterations=niterations, eff_nsamples=nsamples)
docs: Sets the target using the given config file.
  
          This looks for ``niterations`` to set the ``target_niterations``, and
          ``effective-nsamples`` to set the ``target_eff_nsamples``.
  
          Parameters
          ----------
          cp : ConfigParser
              Open config parser to retrieve the argument from.
          section : str
              Name of the section to retrieve from.