import csv
from typing import OrderedDict


def build_dict(dataset_name):
    """Build badges dictionary from the dataset"""

    with open(dataset_name) as csvfile:
        reader = csv.reader(csvfile)

        user_badges = OrderedDict((row[0], row[1:]) for row in reader)

    return user_badges