def _cmd_opts_solver(self, cmd_name):
sections = self.sections_list(cmd_name)<EOL>cmd_dict = self._opt_cmds[cmd_name] if cmd_name else self._opt_bare<EOL>for sct in reversed(sections):<EOL><INDENT>for opt, opt_meta in self._conf[sct].def_.items():<EOL><INDENT>if not opt_meta.cmd_arg:<EOL><INDENT>continue<EOL><DEDENT>if opt not in cmd_dict:<EOL><INDENT>cmd_dict[opt] = sct<EOL><DEDENT>else:<EOL><INDENT>warnings.warn(<EOL>'<STR_LIT>'.format(<EOL>cmd_name, sct, opt, cmd_dict[opt]),<EOL>error.LoamWarning, stacklevel=<NUM_LIT:4>)<EOL><DEDENT><DEDENT><DEDENT>
Scan options related to one command and enrich _opt_cmds.