def parse_methods(csv_file, errors_dict):
    '\n    Parses the input CSV file with columns (method, usability, errors)\n    and yields `MethodInfo` instances as a result.\n    '
    with csv_file.open(newline='') as f:
        f = csv.reader(f)
        next(f, None)
        for (line, (method, usability, errors)) in enumerate(f, start=2):
            try:
                errors = [errors_dict[x] for x in errors.split()]
            except KeyError:
                raise ValueError('Method {} references unknown errors {}'.format(method, errors)) from None
            (yield MethodInfo(method, usability, errors))
Parses the input CSV file with columns (method, usability, errors)
and yields `MethodInfo` instances as a result.
def parse_methods(csv_file, errors_dict):
    '\n    Parses the input CSV file with columns (method, usability, errors)\n    and yields `MethodInfo` instances as a result.\n    '
    with csv_file.open(newline=) as f:
        f = csv.reader(f)
        next(f, None)
        for (line, (method, usability, errors)) in enumerate(f, start=2):
            try:
                errors = [errors_dict[x] for x in errors.split()]
            except KeyError:
                raise ValueError('Method {} references unknown errors {}'.format(method, errors)) from None
            (yield MethodInfo(method, usability, errors))