def _sample(self, minibatch):
        """
        Generate a mix of positive and negative samples. If `seeds` in
        minibatch is not None, `labels` and `indexes` will be constructed
        after negative sampling, based on corresponding seeds.

        Parameters
        ----------
        minibatch : MiniBatch
            An instance of 'MiniBatch' class requires the 'seeds' field. This
            function is responsible for generating negative edges corresponding
            to the positive edges defined by the 'seeds'.

        Returns
        -------
        MiniBatch
            An instance of 'MiniBatch' encompasses both positive and negative
            samples.
        """
        seeds = minibatch.seeds
        if isinstance(seeds, Mapping):
            if minibatch.indexes is None:
                minibatch.indexes = {}
            if minibatch.labels is None:
                minibatch.labels = {}
            for etype, pos_pairs in seeds.items():
                (
                    minibatch.seeds[etype],
                    minibatch.labels[etype],
                    minibatch.indexes[etype],
                ) = self._sample_with_etype(pos_pairs, etype)
        else:
            (
                minibatch.seeds,
                minibatch.labels,
                minibatch.indexes,
            ) = self._sample_with_etype(seeds)
        return minibatch

        Generate a mix of positive and negative samples. If `seeds` in
        minibatch is not None, `labels` and `indexes` will be constructed
        after negative sampling, based on corresponding seeds.

        Parameters
        ----------
        minibatch : MiniBatch
            An instance of 'MiniBatch' class requires the 'seeds' field. This
            function is responsible for generating negative edges corresponding
            to the positive edges defined by the 'seeds'.

        Returns
        -------
        MiniBatch
            An instance of 'MiniBatch' encompasses both positive and negative
            samples.
        
python/dgl/graphbolt/negative_sampler.py