# Path: tacl/constants.py
# CATALOGUE_WORK_RELABELLED_ERROR = 'Catalogue file labels "{}" more than once.'
# 
# Path: tacl/exceptions.py
# class MalformedCatalogueError(TACLError):
# 
#     pass


import copy
import csv
import os
from .constants import CATALOGUE_WORK_RELABELLED_ERROR
from .exceptions import MalformedCatalogueError



class Catalogue (dict):

    """Dictionary mapping works (keys) to labels (values). Each work may
    have only one label."""

    def __init__(self, *args, **kwargs):
        self._ordered_labels = []
        super().__init__(*args, **kwargs)


# Path: tacl/constants.py
# CATALOGUE_WORK_RELABELLED_ERROR = 'Catalogue file labels "{}" more than once.'
# 
# Path: tacl/exceptions.py
# class MalformedCatalogueError(TACLError):
# 
#     pass


# Path: tacl/catalogue.py
import copy
import csv
import os
from .constants import CATALOGUE_WORK_RELABELLED_ERROR
from .exceptions import MalformedCatalogueError




class Catalogue (dict):

    """Dictionary mapping works (keys) to labels (values). Each work may
    have only one label."""

    def __init__(self, *args, **kwargs):
        self._ordered_labels = []
        super().__init__(*args, **kwargs)


    def generate(self, path, label):