def expand(sample, expansion_specs):
    """
    Perform multiple expansions.

    :param sample: Initial node.
    :type sample: Numpy array.
    :param expansion_specs: List of :py:class:`FeatureExpansionSpec` object.
    :returns: List of numpy arrays.
    """
    children = []
    for spec in expansion_specs:
        children.extend(spec.expand_fn(sample, spec.idxs))

    return children