<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_cls_for_collection(self, collection):
 """ Return the class for a given collection name. :param collection: The name of the collection for which to return the class. :returns: A reference to the class for the given collection name. """

        for cls, params in self.classes.items():
            if params['collection'] == collection:
                return cls
        raise AttributeError("Unknown collection: %s" % collection)