<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_instances(configuration):
 """Create necessary class instances from a configuration with no argument to the constructor :param dict configuration: configuration dict like in :attr:`~pyextdirect.configuration.Base.configuration` :return: a class-instance mapping :rtype: dict """

    instances = {}
    for methods in configuration.itervalues():
        for element in methods.itervalues():
            if not isinstance(element, tuple):
                continue
            cls, _ = element
            if cls not in instances:
                instances[cls] = cls()
    return instances