def backward_path(es, dataframe_ids):
    """
    Create a backward RelationshipPath through the given dataframes. Assumes only
    one such path is possible.
    """

    def _get_relationship(child, parent):
        return next(
            r
            for r in es.get_forward_relationships(child)
            if r._parent_dataframe_name == parent
        )

    relationships = [
        _get_relationship(child, parent)
        for parent, child in zip(dataframe_ids[:-1], dataframe_ids[1:])
    ]

    return RelationshipPath([(False, r) for r in relationships])

    Create a backward RelationshipPath through the given dataframes. Assumes only
    one such path is possible.
    
featuretools/tests/testing_utils/features.py