def forward(self, true_classes):
        """Draw samples from log uniform distribution and returns sampled candidates,
        expected count for true classes and sampled classes.

        Parameters
        ----------
        true_classes: NDArray
            The true classes.

        Returns
        -------
        samples: NDArray
            The sampled candidate classes.
        expected_count_sample: NDArray
            The expected count for sampled candidates.
        expected_count_true: NDArray
            The expected count for true classes in the same shape as `true_classes`.
        """
        num_sampled = self._num_sampled
        ctx = true_classes.context
        num_tries = 0
        log_range = math.log(self._range_max + 1)

        # sample candidates
        f = ndarray._internal._sample_unique_zipfian
        sampled_classes, num_tries = f(self._range_max, shape=(1, num_sampled))
        sampled_classes = sampled_classes.reshape((-1,))
        sampled_classes = sampled_classes.as_in_context(ctx)
        num_tries = num_tries.as_in_context(ctx)

        # expected count for true classes
        true_cls = true_classes.as_in_context(ctx).astype('float64')
        prob_true = ((true_cls + 2.0) / (true_cls + 1.0)).log() / log_range
        count_true = self._prob_helper(num_tries, prob_true)
        # expected count for sampled classes
        sampled_classes = ndarray.array(sampled_classes, ctx=ctx, dtype='int64')
        sampled_cls_fp64 = sampled_classes.astype('float64')
        prob_sampled = ((sampled_cls_fp64 + 2.0) / (sampled_cls_fp64 + 1.0)).log() / log_range
        count_sampled = self._prob_helper(num_tries, prob_sampled)
        # convert to dtype
        sampled_classes = sampled_classes.astype(self._dtype, copy=False)
        count_true = count_true.astype(self._dtype, copy=False)
        count_sampled = count_sampled.astype(self._dtype, copy=False)
        return sampled_classes, count_sampled, count_true
Draw samples from log uniform distribution and returns sampled candidates,
        expected count for true classes and sampled classes.

        Parameters
        ----------
        true_classes: NDArray
            The true classes.

        Returns
        -------
        samples: NDArray
            The sampled candidate classes.
        expected_count_sample: NDArray
            The expected count for sampled candidates.
        expected_count_true: NDArray
            The expected count for true classes in the same shape as `true_classes`.