<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def num_indices_generated(self):
 """ Get the number of indices that would be generated by this sampler. Returns ------- int, `np.inf` or `None`. An int if the number of samples is known, `np.inf` if it is infinite or `None` if the number of samples is unknown. """

        if self.repeats == -1:
            return np.inf
        else:
            return self.length * self.repeats