def parse_yaml_config(yaml_config, repo_home):
config = collections.defaultdict(list)<EOL>variables = {<EOL>'<STR_LIT>': os.path.join(os.path.dirname(__file__), '<STR_LIT>'),<EOL>'<STR_LIT>': repo_home,<EOL>}<EOL>for name, data in yaml_config.items():<EOL><INDENT>command = _replace_variables([data['<STR_LIT>']], variables)[<NUM_LIT:0>]<EOL>requirements = _replace_variables(<EOL>data.get('<STR_LIT>', []), variables)<EOL>arguments = _replace_variables(data.get('<STR_LIT>', []), variables)<EOL>not_found_programs = utils.programs_not_in_path([command] +<EOL>requirements)<EOL>if not_found_programs:<EOL><INDENT>linter_command = Partial(missing_requirements_command,<EOL>not_found_programs, data['<STR_LIT>'])<EOL><DEDENT>else:<EOL><INDENT>linter_command = Partial(lint_command, name, command, arguments,<EOL>data['<STR_LIT>'])<EOL><DEDENT>for extension in data['<STR_LIT>']:<EOL><INDENT>config[extension].append(linter_command)<EOL><DEDENT><DEDENT>return config<EOL>
Converts a dictionary (parsed Yaml) to the internal representation.