'Extracts a list of XBlock location tuples from a list of Relationships.
Arguments:
relationships: list of py2neo `Relationship` objects
relationship_type: the type of relationship to filter `relationships`
by.
Returns:
List of tuples of the locations of of the relationships\'
constituent nodes.'

@staticmethod
def _extract_relationship_pairs(relationships, relationship_type):

    relationship_pairs = [tuple([node[u'location'] for node in rel.nodes()]) for rel in relationships if (rel.type() == relationship_type)]
    return relationship_pairs
