def get_deltas(expr, deltas, no_deltas_rule):
    if isinstance(deltas, bz.Expr) or deltas != 'auto':
        return deltas

    try:
        return expr._child[(expr._name or '') + '_deltas']
    except (ValueError, AttributeError):
        if no_deltas_rule == no_deltas_rules.raise_:
            raise ValueError(
                "no deltas table could be reflected for %s" % expr
            )
        elif no_deltas_rule == no_deltas_rules.warn:
            warnings.warn(NoDeltasWarning(expr))
    return None
Find the correct deltas for the expression.
dataset/ETHPy150Open quantopian/zipline/zipline/pipeline/loaders/blaze/core.py/get_deltas