Returns the set of this step and all steps passed to the constructor (recursively).

def _expand_inputs(step, steps=None):
    """
    Returns the set of this step and all steps passed to the constructor (recursively).
    """
    if steps is None:
        steps = set()

    for arg in step._kwargs.values():
        if isinstance(arg, Step):
            _expand_inputs(arg, steps=steps)
        elif util.is_instance_collection(arg, Step):
            for s in util.get_collection_values(arg):
                _expand_inputs(s, steps=steps)

    steps.add(step)
    return steps