code: def dataset_ncf_files(dataset_ncf):
      train, test = dataset_ncf
      test = test[test["userID"].isin(train["userID"].unique())]
      test = test[test["itemID"].isin(train["itemID"].unique())]
      train = train.sort_values(by=DEFAULT_USER_COL)
      test = test.sort_values(by=DEFAULT_USER_COL)
      leave_one_out_test = test.groupby("userID").last().reset_index()
      return train, test, leave_one_out_test
  
imports: import calendar
  import datetime
  import os
  from pathlib import Path
  from tempfile import TemporaryDirectory
  import numpy
  import pandas
  import pytest
  from sklearn.model_selection import train_test_split
  from recommenders.utils.constants import DEFAULT_USER_COL, DEFAULT_ITEM_COL, DEFAULT_RATING_COL, DEFAULT_TIMESTAMP_COL
  from recommenders.datasets.python_splitters import numpy_stratified_split
  from recommenders.datasets.python_splitters import python_chrono_split
  from recommenders.utils.spark_utils import start_or_get_spark
label_desc: Use image node_id 17 for calling a global function with example usage: dataset_ncf_files(dataset_ncf) and returns: train,  test,  leave_one_out_test