def _get_config(filename):
i = interpolation.Interpolator(interpolation.TemplateWithDefaults,<EOL>os.environ)<EOL>with open(filename, '<STR_LIT:r>') as stream:<EOL><INDENT>try:<EOL><INDENT>interpolated_config = i.interpolate(stream.read())<EOL>return yaml.safe_load(interpolated_config)<EOL><DEDENT>except yaml.parser.ParserError as e:<EOL><INDENT>msg = '<STR_LIT>'.format(e)<EOL>raise ParseError(msg)<EOL><DEDENT><DEDENT>
Parse the provided YAML file and return a dict.

:parse filename: A string containing the path to YAML file.
:return: dict