def METHOD_NAME(self, dataset):
    if dataset.number_of_dimensions == 1 or dataset.number_of_dimensions == 2:
           return True
    else:
        raise ValueError("Expected input dimensions is 1 or 2, got {0}"\
                         .format(dataset.number_of_dimensions))