<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_cycle_numbers(self, dataset_number=None, steptable=None):
 """Get a list containing all the cycle numbers in the test."""

        if steptable is None:
            dataset_number = self._validate_dataset_number(dataset_number)
            if dataset_number is None:
                self._report_empty_dataset()
                return
            d = self.datasets[dataset_number].dfdata
            cycles = np.unique(d[self.headers_normal.cycle_index_txt])
        else:
            cycles = np.unique(steptable[self.headers_step_table.cycle])
        return cycles