code: def python_dataset(test_specs):
      def random_date_generator(start_date, range_in_days):
          """Helper function to generate random timestamps.
  
          Reference: https://stackoverflow.com/questions/41006182/generate-random-dates-within-a-range-in-numpy
          """
          days_to_add = np.arange(0, range_in_days)
          random_dates = []
          for i in range(range_in_days):
              random_date = np.datetime64(
                  start_date
              ) + np.random.choice(days_to_add)
              random_dates.append(random_date)
  
          return random_dates
  
      np.random.seed(test_specs["seed"])
  
      rating = pd.DataFrame(
          {
              DEFAULT_USER_COL: np.random.randint(
                  1, 5, test_specs["number_of_rows"]
              ),
              DEFAULT_ITEM_COL: np.random.randint(
                  1, 15, test_specs["number_of_rows"]
              ),
              DEFAULT_RATING_COL: np.random.randint(
                  1, 6, test_specs["number_of_rows"]
              ),
              DEFAULT_TIMESTAMP_COL: random_date_generator(
                  "2018-01-01", test_specs["number_of_rows"]
              ),
          }
      )
      return rating
  
file_path: recommenders/tests/unit/recommenders/datasets/test_python_splitter.py
imports: import pytest
  import pandas
  import numpy
  from recommenders.utils.constants import DEFAULT_USER_COL, DEFAULT_ITEM_COL, DEFAULT_RATING_COL, DEFAULT_TIMESTAMP_COL
  from recommenders.datasets.split_utils import min_rating_filter_pandas, split_pandas_data_with_ratios
  from recommenders.datasets.python_splitters import python_chrono_split, python_random_split, python_stratified_split, numpy_stratified_split
label_desc: Use image node_id 2 for calling a global function with example usage: python_dataset(test_specs) and returns: rating, random_dates