def get_part_size(self):
        """Get data size of current partition.

        Returns
        -------
        int
            data size
        """
        if self.is_node:
            return len(
                self._partition_book.partid2nids(self._part_id, self.type_name)
            )
        else:
            return len(
                self._partition_book.partid2eids(self._part_id, self.type_name)
            )
Get data size of current partition.

        Returns
        -------
        int
            data size
        
python/dgl/distributed/graph_partition_book.py