code: def dataset_from_dict(d: dict, index_name: str = None) -> Dataset:
      dataframe = pd.DataFrame(data=d)
      return Dataset(dataframe, index_name=index_name)
  
file_path: deepchecks/tests/tabular/checks/train_test_validation/index_train_val_leakage_test.py
imports: import numpy
  import pandas
  from hamcrest import assert_that, calling, close_to, greater_than, has_items, has_length, raises
  from deepchecks.core.errors import DatasetValidationError, DeepchecksValueError
  from deepchecks.tabular.checks.train_test_validation.index_leakage import IndexTrainTestLeakage
  from deepchecks.tabular.dataset import Dataset
  from tests.base.utils import equal_condition_result
label_desc: Use image node_id 1 for calling a global function with example usage: dataset_from_dict(d, index_name) and returns: Dataset