@staticmethod
def _transform_dataset(is_complex: bool, validation_data, polar):
    val_data_fit = None
    if (validation_data is not None):
        if isinstance(validation_data, tf.data.Dataset):
            if (not is_complex):
                val_data_fit = validation_data.map((lambda x, y: transform_to_real_map_function(x, y, mode=polar)))
            else:
                val_data_fit = validation_data
        elif ((is_complex and validation_data[0].dtype.is_complex) or ((not is_complex) and validation_data[0].dtype.is_floating)):
            val_data_fit = validation_data
        elif (is_complex and (not validation_data[0].dtype.is_complex)):
            raise NotImplementedError(f'The input dataset is expected to be complex')
        else:
            val_data_fit = (transform_to_real(validation_data[0], mode=polar), validation_data[1])
    return val_data_fit
@staticmethod
def _transform_dataset(is_complex: bool, validation_data, polar):
    val_data_fit = None
    if (validation_data is not None):
        if isinstance(validation_data, tf.data.Dataset):
            if (not is_complex):
                val_data_fit = validation_data.map((lambda x, y: transform_to_real_map_function(x, y, mode=polar)))
            else:
                val_data_fit = validation_data
        elif ((is_complex and validation_data[0].dtype.is_complex) or ((not is_complex) and validation_data[0].dtype.is_floating)):
            val_data_fit = validation_data
        elif (is_complex and (not validation_data[0].dtype.is_complex)):
            raise NotImplementedError(f'The input dataset is expected to be complex')
        else:
            val_data_fit = (transform_to_real(validation_data[0], mode=polar), validation_data[1])
    return val_data_fit