<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _pick_up_classes(modules, classnames):
 """ Given a list of class names to retrieve, try to fetch them from the specified list of modules and returns the list of the fetched classes. """

    klasses = []
    for classname in classnames:
        klass = None
        for module in modules:
            if hasattr(module, classname):
                klass = getattr(module, classname)
                break
        if not klass:
            raise ClassNotFoundError('Error fetching \'{}\' in {}'.format(
                classname, str([module.__name__ for module in modules]))
            )
        klasses.append(klass)
    return klasses