code: def dump(self, cnf, ioi, **kwargs):
          
          kwargs = anyconfig.utils.filter_options(self._dump_opts, kwargs)
  
          if anyconfig.utils.is_stream_ioinfo(ioi):
              self.dump_to_stream(cnf, ioi.src, **kwargs)
          else:
              ensure_outdir_exists(ioi.path)
              self.dump_to_path(cnf, ioi.path, **kwargs)
docs: Dump config 'cnf' to output object of which 'ioi' refering.
  
          :param cnf: Configuration data to dump
          :param ioi:
              an 'anyconfig.globals.IOInfo' namedtuple object provides various
              info of input object to load data from
  
          :param kwargs: optional keyword parameters to be sanitized :: dict
          :raises IOError, OSError, AttributeError: When dump failed.