def flatten(self):
        """Evaluate the chain of indices, and return a single index tensor."""
        flat_index = self._indices[0]
        # here we actually need to resolve it
        for index in self._indices[1:]:
            if F.context(index) != F.context(flat_index):
                index = F.copy_to(index, F.context(flat_index))
            flat_index = F.gather_row(flat_index, index)
        return flat_index
Evaluate the chain of indices, and return a single index tensor.
python/dgl/frame.py