def _get_offsets(self, node):
        """
        @type node: C{PyNode}
        @param node: a node in the Graf graph
        @return: the offsets contained by a given node
        @rtype: C{pair} of C{int}, or C{None}
        """
        
        if len(node._links) == 0 and node._outEdgeList != []:
            offsets = []
            edge_list = node._outEdgeList
            edge_list.reverse()
            for edge in edge_list:
                temp_offsets = self._get_offsets(edge._toNode)
                if temp_offsets is not None:
                    offsets.extend(self._get_offsets(edge._toNode))
            if len(offsets) == 0:
                return None
            offsets.sort()
            start = offsets[0]
            end = offsets[len(offsets)-1]
            return [start, end]
        elif len(node._links) != 0:
            offsets = []
            for link in node._links:
                for region in link._regions:
                    for anchor in region._anchors:
                        offsets.append(int(anchor._offset))
            offsets.sort()
            start = offsets[0]
            end = offsets[len(offsets)-1]
            return [start, end]
        else:
            return None
dataset/ETHPy150Open cidles/graf-python/nltk/masc.py/MascCorpusReader._get_offsets/original