code: def _prep_training_data(c, X_train, y_train, partitions_per_worker):
      workers = c.has_what().keys()
      n_partitions = partitions_per_worker * len(workers)
      X_cudf = cudf.DataFrame.from_pandas(pd.DataFrame(X_train))
      X_train_df = dask_cudf.from_cudf(X_cudf, npartitions=n_partitions)
  
      y_cudf = np.array(pd.DataFrame(y_train).values)
      y_cudf = y_cudf[:, 0]
      y_cudf = cudf.Series(y_cudf)
      y_train_df = dask_cudf.from_cudf(y_cudf, npartitions=n_partitions)
  
      X_train_df, y_train_df = dask_utils.persist_across_workers(
          c, [X_train_df, y_train_df], workers=workers
      )
      return X_train_df, y_train_df
  
file_path: cuml/python/cuml/tests/dask/test_dask_linear_regression.py
imports: from cuml.internals.safe_imports import gpu_only_import
  import pytest
  from cuml.dask.common import utils
  from sklearn.metrics import mean_squared_error
  from sklearn.datasets import make_regression
  from cuml.internals.safe_imports import cpu_only_import
label_desc: Use image node_id 1 for calling a global function with example usage: _prep_training_data(c, X_train, y_train, partitions_per_worker) and returns: X_train_df,  y_train_df