def METHOD_NAME(self):
    if self:
        # Yield first dataframe.
        is_forward, relationship = self[0]
        if is_forward:
            yield relationship._child_dataframe_name
        else:
            yield relationship._parent_dataframe_name
    # Yield the dataframe pointed to by each relationship.
    for is_forward, relationship in self:
        if is_forward:
            yield relationship._parent_dataframe_name
        else:
            yield relationship._child_dataframe_name