code: def _output_result(cnf, outpath, otype, inpaths, itype,
                     extra_opts=None):
      
      fmsg = ("Uknown file type and cannot detect appropriate backend "
              "from its extension, '%s'")
  
      if not anyconfig.utils.is_dict_like(cnf):
          _exit_with_output(str(cnf))  # Print primitive types as it is.
  
      if not outpath or outpath == "-":
          outpath = sys.stdout
          if otype is None:
              otype = _output_type_by_input_path(inpaths, itype, fmsg)
  
      _try_dump(cnf, outpath, otype, fmsg, extra_opts=extra_opts)
docs: :param cnf: Configuration object to print out
      :param outpath: Output file path or None
      :param otype: Output type or None
      :param inpaths: List of input file paths
      :param itype: Input type or None
      :param extra_opts: Map object will be given to API.dump as extra options