def __call__(self, cls, *args, **kwargs):
    try:
        return cls.__instance
    except AttributeError:
        cls.__instance = super(SingletonType, cls).__call__(*args, **kwargs)
        return cls.__instance
def __call__(self, cls, *args, **kwargs):
    try:
        return cls.__instance
    except AttributeError:
        cls.__instance = super(SingletonType, cls).__call__(*args, **kwargs)
        return cls.__instance