<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sample(self, rstate=None):
 """ Draw a sample uniformly distributed within the unit cube. Returns ------- x : `~numpy.ndarray` with shape (ndim,) A coordinate within the unit cube. """


        if rstate is None:
            rstate = np.random

        return rstate.rand(self.n)