code: def test_ranking_preprocessing(tenrec_data_path, use_dask_cluster):
      with tempfile.TemporaryDirectory() as tmp_output_folder:
          additional_kwargs = {}
          if use_dask_cluster:
              additional_kwargs["enable_dask_cuda_cluster"] = None
              additional_kwargs["persist_intermediate_files"] = None
  
          args = kwargs_to_cli_ags(
              data_path=os.path.join(
                  tenrec_data_path, "raw/QK-video-10M.csv"
              ),
              input_data_format="csv",
              csv_na_values="\\N",
              output_path=tmp_output_folder,
              categorical_features="user_id,item_id,video_category,gender",
              continuous_features="age",
              target_encoding_features="user_id,item_id",
              target_encoding_targets="click,follow",
              binary_classif_targets="click,follow,like,share",
              regression_targets="watching_times",
              to_int32="user_id,item_id",
              to_int16="watching_times",
              to_int8="gender,age,video_category,click,follow,like,share",
              user_id_feature="user_id",
              item_id_feature="item_id",
              **additional_kwargs,
          )
          runner = PreprocessingRunner(args)
          runner.run()
  
          expected_max_values = {
              "user_id": 296088,
              "item_id": 617033,
              "video_category": 2,
              "gender": 3,
              "click": 1,
              "follow": 1,
              "like": 1,
              "share": 1,
              "watching_times": 528,
          }
  
          schema = check_schema(
              os.path.join(tmp_output_folder, "train/"),
              expected_max_values,
          )
  
          expected_dtypes = {
              "user_id": np.dtype("int64"),
              "item_id": np.dtype("int64"),
              "video_category": np.dtype("int64"),
              "gender": np.dtype("int64"),
              "age": np.dtype("float64"),
              "TE_user_id_click": np.dtype("float32"),
              "TE_item_id_click": np.dtype("float32"),
              "TE_user_id_follow": np.dtype("float32"),
              "TE_item_id_follow": np.dtype("float32"),
              "click": np.dtype("int8"),
              "follow": np.dtype("int8"),
              "like": np.dtype("int8"),
              "share": np.dtype("int8"),
              "watching_times": np.dtype("int16"),
          }
  
          train_df = cudf.read_parquet(
              os.path.join(tmp_output_folder, "train/*.parquet")
          )
          assert (
              not train_df.isna().max().max()
          )  # Check if there are null values
          assert len(train_df) == 10000000  # row count
  
          assert train_df.dtypes.to_dict() == expected_dtypes
  
          categ_features = schema.select_by_tag(
              Tags.CATEGORICAL
          ).column_names
          target_features = schema.select_by_tag(
              Tags.TARGET
          ).column_names
          assert (
              train_df[categ_features + target_features].max().to_dict()
              == expected_max_values
          )
  
          # Checking age standardization
          assert 0.0 == pytest.approx(train_df["age"].mean(), abs=1e-3)
          assert 1.0 == pytest.approx(train_df["age"].std(), abs=1e-3)
  
          # Check target encoding features
          te_features = [
              "TE_user_id_follow",
              "TE_item_id_follow",
              "TE_user_id_click",
              "TE_item_id_click",
          ]
          assert (
              train_df[te_features].min().min() >= 0
              and train_df[te_features].max().max() <= 1
          )
  
file_path: Merlin/tests/integration/examples/quick_start/test_preproc.py
imports: import os
  import tempfile
  import cudf
  import numpy
  import pytest
  from examples.quick_start.scripts.preproc.preprocessing import PreprocessingRunner
  from merlin.schema import Tags
  from merlin.schema.io.tensorflow_metadata import TensorflowMetadata
label_desc: Use image node_id 5 for calling a global function with example usage: test_ranking_preprocessing(tenrec_data_path, use_dask_cluster) without return types