def __call__(self, ids):
        """Convert the homogeneous IDs to (type_id, type_wise_id).

        Parameters
        ----------
        ids : 1D tensor
            The homogeneous ID.

        Returns
        -------
        type_ids : Tensor
            Type IDs
        per_type_ids : Tensor
            Type-wise IDs
        """
        if self.num_types == 0:
            return F.zeros((len(ids),), F.dtype(ids), F.cpu()), ids
        if len(ids) == 0:
            return ids, ids

        ids = utils.toindex(ids, dtype=self.dtype_str)
        ret = _CAPI_DGLHeteroMapIds(
            ids.todgltensor(),
            self.range_start.todgltensor(),
            self.range_end.todgltensor(),
            self.typed_map.todgltensor(),
            self.num_parts,
            self.num_types,
        )
        ret = utils.toindex(ret, dtype=self.dtype_str).tousertensor()
        return ret[: len(ids)], ret[len(ids) :]
Convert the homogeneous IDs to (type_id, type_wise_id).

        Parameters
        ----------
        ids : 1D tensor
            The homogeneous ID.

        Returns
        -------
        type_ids : Tensor
            Type IDs
        per_type_ids : Tensor
            Type-wise IDs
        
python/dgl/distributed/id_map.py