def process_chain(callbacks, input, *a, **kw):
    """Return a Deferred built by chaining the given callbacks"""
    d = defer.Deferred()
    for x in callbacks:
        d.addCallback(x, *a, **kw)
    d.callback(input)
    return d
Return a Deferred built by chaining the given callbacks
stackoverflow/venv/lib/python3.6/site-packages/scrapy/utils/defer.py