def forward(self, true_classes):
num_sampled = self._num_sampled<EOL>ctx = true_classes.context<EOL>num_tries = <NUM_LIT:0><EOL>log_range = math.log(self._range_max + <NUM_LIT:1>)<EOL>f = ndarray._internal._sample_unique_zipfian<EOL>sampled_classes, num_tries = f(self._range_max, shape=(<NUM_LIT:1>, num_sampled))<EOL>sampled_classes = sampled_classes.reshape((-<NUM_LIT:1>,))<EOL>sampled_classes = sampled_classes.as_in_context(ctx)<EOL>num_tries = num_tries.as_in_context(ctx)<EOL>true_cls = true_classes.as_in_context(ctx).astype('<STR_LIT>')<EOL>prob_true = ((true_cls + <NUM_LIT>) / (true_cls + <NUM_LIT:1.0>)).log() / log_range<EOL>count_true = self._prob_helper(num_tries, prob_true)<EOL>sampled_classes = ndarray.array(sampled_classes, ctx=ctx, dtype='<STR_LIT>')<EOL>sampled_cls_fp64 = sampled_classes.astype('<STR_LIT>')<EOL>prob_sampled = ((sampled_cls_fp64 + <NUM_LIT>) / (sampled_cls_fp64 + <NUM_LIT:1.0>)).log() / log_range<EOL>count_sampled = self._prob_helper(num_tries, prob_sampled)<EOL>sampled_classes = sampled_classes.astype(self._dtype, copy=False)<EOL>count_true = count_true.astype(self._dtype, copy=False)<EOL>count_sampled = count_sampled.astype(self._dtype, copy=False)<EOL>return sampled_classes, count_sampled, count_true<EOL>
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`.