# Path: tensorflow_model_remediation/tools/tutorials_utils/uci/utils.py
# _UCI_DATA_URL_TEMPLATE = ('https://storage.googleapis.com/uci_dataset/adult.{}')
# _UCI_COLUMN_NAMES = [
#     'age', 'workclass', 'fnlwgt', 'education', 'education-num',
#     'marital-status', 'occupation', 'relationship', 'race', 'sex',
#     'capital-gain', 'capital-loss', 'hours-per-week', 'native-country', 'income'
# ]
# def _get_full_uci_dataframe(url):
# def _get_uci_data_from_url(url, sample=None):
# def get_uci_data(split='train', sample=None):
# def df_to_dataset(dataframe, shuffle=False, batch_size=None):
# def get_uci_min_diff_datasets(split='train',
#                               sample=None,
#                               original_batch_size=128,
#                               min_diff_batch_size=32):
# def get_uci_with_min_diff_dataset(split='train', sample=None):
# def get_uci_model(model_class=tf.keras.Model):
#   def _add_input_feature(input_layer, feature=None):


import unittest.mock as mock
import pandas as pd
import tensorflow as tf
from tensorflow_model_remediation.tools.tutorials_utils.uci import utils
    ])
    mock_md_ds1.batch.assert_called_once_with(
        min_diff_batch_size, drop_remainder=True)
    mock_md_ds2.batch.assert_called_once_with(
        min_diff_batch_size, drop_remainder=True)

  @mock.patch('tensorflow_model_remediation.tools.tutorials_utils'
              '.uci.utils.get_uci_data',
              autospec=True)
  def testGetMinDiffDatasetsDefaults(self, mock_get_uci_data):
    _ = utils.get_uci_min_diff_datasets()

    mock_get_uci_data.assert_has_calls(
        [mock.call(split='train', sample=None),
         mock.call(split='train')],
        any_order=True)

  @mock.patch('tensorflow_model_remediation.min_diff.keras.utils.'
              'pack_min_diff_data',
              autospec=True)
  @mock.patch('tensorflow_model_remediation.tools.tutorials_utils'
              '.uci.utils.get_uci_min_diff_datasets',
              autospec=True)
  def testGetUciWithMinDiffDataset(self, mock_get_uci_min_diff_datasets,
                                   mock_pack_data):
    mock_get_uci_min_diff_datasets.return_value = ('og', 'md1', 'md2')
    mock_pack_data.return_value = 'packed_data'

    sample = 0.56  # Arbitrary sample value.
    split = 'fake_split'

# Path: tensorflow_model_remediation/tools/tutorials_utils/uci/utils.py
# _UCI_DATA_URL_TEMPLATE = ('https://storage.googleapis.com/uci_dataset/adult.{}')
# _UCI_COLUMN_NAMES = [
#     'age', 'workclass', 'fnlwgt', 'education', 'education-num',
#     'marital-status', 'occupation', 'relationship', 'race', 'sex',
#     'capital-gain', 'capital-loss', 'hours-per-week', 'native-country', 'income'
# ]
# def _get_full_uci_dataframe(url):
# def _get_uci_data_from_url(url, sample=None):
# def get_uci_data(split='train', sample=None):
# def df_to_dataset(dataframe, shuffle=False, batch_size=None):
# def get_uci_min_diff_datasets(split='train',
#                               sample=None,
#                               original_batch_size=128,
#                               min_diff_batch_size=32):
# def get_uci_with_min_diff_dataset(split='train', sample=None):
# def get_uci_model(model_class=tf.keras.Model):
#   def _add_input_feature(input_layer, feature=None):


# Path: tensorflow_model_remediation/tools/tutorials_utils/uci/utils_test.py
import unittest.mock as mock
import pandas as pd
import tensorflow as tf
from tensorflow_model_remediation.tools.tutorials_utils.uci import utils

    ])
    mock_md_ds1.batch.assert_called_once_with(
        min_diff_batch_size, drop_remainder=True)
    mock_md_ds2.batch.assert_called_once_with(
        min_diff_batch_size, drop_remainder=True)

  @mock.patch('tensorflow_model_remediation.tools.tutorials_utils'
              '.uci.utils.get_uci_data',
              autospec=True)
  def testGetMinDiffDatasetsDefaults(self, mock_get_uci_data):
    _ = utils.get_uci_min_diff_datasets()

    mock_get_uci_data.assert_has_calls(
        [mock.call(split='train', sample=None),
         mock.call(split='train')],
        any_order=True)

  @mock.patch('tensorflow_model_remediation.min_diff.keras.utils.'
              'pack_min_diff_data',
              autospec=True)
  @mock.patch('tensorflow_model_remediation.tools.tutorials_utils'
              '.uci.utils.get_uci_min_diff_datasets',
              autospec=True)
  def testGetUciWithMinDiffDataset(self, mock_get_uci_min_diff_datasets,
                                   mock_pack_data):
    mock_get_uci_min_diff_datasets.return_value = ('og', 'md1', 'md2')
    mock_pack_data.return_value = 'packed_data'

    sample = 0.56  # Arbitrary sample value.
    split = 'fake_split'

    res = utils.get_uci_with_min_diff_dataset(split=split, sample=sample)