def hybrid_forward(self, F, candidates_like, prob, alias):<EOL>
flat_shape = functools.reduce(operator.mul, self._shape)<EOL>idx = F.random.uniform(low=<NUM_LIT:0>, high=self.N, shape=flat_shape,<EOL>dtype='<STR_LIT>').floor()<EOL>prob = F.gather_nd(prob, idx.reshape((<NUM_LIT:1>, -<NUM_LIT:1>)))<EOL>alias = F.gather_nd(alias, idx.reshape((<NUM_LIT:1>, -<NUM_LIT:1>)))<EOL>where = F.random.uniform(shape=flat_shape,<EOL>dtype='<STR_LIT>') < prob<EOL>hit = idx * where<EOL>alt = alias * (<NUM_LIT:1> - where)<EOL>candidates = (hit + alt).reshape(self._shape)<EOL>return candidates.astype(self._dtype)<EOL>
Draw samples from uniform distribution and return sampled candidates.

        Parameters
        ----------
        candidates_like: mxnet.nd.NDArray or mxnet.sym.Symbol
            This input specifies the shape of the to be sampled candidates. #
            TODO shape selection is not yet supported. Shape must be specified
            in the constructor.

        Returns
        -------
        samples: mxnet.nd.NDArray or mxnet.sym.Symbol
            The sampled candidates of shape candidates_like.shape. Candidates
            are sampled based on the weights specified on creation of the
            UnigramCandidateSampler.