def __init__(self, *args, **kwargs):
        self.args = args
        try:
            self.input = args[0].input
        except AttributeError:
            pass
        try:
            self.output = args[-1].output
        except __HOLE__:
            pass
        if not kwargs.get('check_consistency', True):
            return
        for x in range(len(args) - 1):
            try:
                if args[x].output != args[x + 1].input:
                    raise TypeError(
                        'The format chaining is not valid, %s expect %s'
                        'but %s provide %s' % (
                            args[x].__class__.__name__,
                            args[x].input,
                            args[x + 1].__class__.__name__,
                            args[x + 1].output,
                        )
                    )
            except AttributeError:
                pass
dataset/ETHPy150Open spotify/luigi/luigi/format.py/ChainFormat.__init__