def draw(self, k=1, random_state=None):
        """
        Returns k draws from q.

        For each such draw, the value i is returned with probability
        q[i].

        Parameters
        -----------
        k : scalar(int), optional
            Number of draws to be returned

        random_state : int or np.random.RandomState, optional
            Random seed (integer) or np.random.RandomState instance to set
            the initial state of the random number generator for
            reproducibility. If None, a randomly initialized RandomState is
            used.

        Returns
        -------
        array_like(int)
            An array of k independent draws from q

        """
        random_state = check_random_state(random_state)

        return self.Q.searchsorted(random_state.uniform(0, 1, size=k),
                                   side='right')