def __call__(cls, *args, **kwargs):
    """
        The constructor/initializer require at least one argument since
        the first argument is the singleton key.

        If an instance was already created with the requested key, it is
        returned without being re-allocated or re-initialized. 
        """
    if not args:
        raise ValueError('Instance key must be first argument in constructor')
    key = args[0]
    if key in cls._instances:
        instance = cls._instances[key]
    else:
        instance = super().__call__(*args, **kwargs)
        cls._instances[key] = instance
    return instance
