code: def test_rf_broadcast(
      model_type, fit_broadcast, transform_broadcast, client
  ):
      # Use CUDA_VISIBLE_DEVICES to control the number of workers
      workers = list(client.scheduler_info()["workers"].keys())
      n_workers = len(workers)
  
      if model_type == "classification":
          X, y = make_classification(
              n_samples=n_workers * 1000,
              n_features=20,
              n_informative=15,
              n_classes=4,
              n_clusters_per_class=1,
              random_state=999,
          )
          y = y.astype(np.int32)
      else:
          X, y = make_regression(
              n_samples=n_workers * 1000,
              n_features=20,
              n_informative=5,
              random_state=123,
          )
          y = y.astype(np.float32)
      X = X.astype(np.float32)
  
      X_train, X_test, y_train, y_test = train_test_split(
          X, y, test_size=n_workers * 100, random_state=123
      )
  
      X_train_df, y_train_df = _prep_training_data(
          client, X_train, y_train, 1
      )
      X_test_dask_array = from_array(X_test)
  
      n_estimators = n_workers * 8
  
      if model_type == "classification":
          cuml_mod = cuRFC_mg(
              n_estimators=n_estimators,
              max_depth=8,
              n_bins=16,
              ignore_empty_partitions=True,
          )
          cuml_mod.fit(
              X_train_df, y_train_df, broadcast_data=fit_broadcast
          )
          cuml_mod_predict = cuml_mod.predict(
              X_test_dask_array, broadcast_data=transform_broadcast
          )
  
          cuml_mod_predict = cuml_mod_predict.compute()
          cuml_mod_predict = cp.asnumpy(cuml_mod_predict)
          acc_score = accuracy_score(
              cuml_mod_predict, y_test, normalize=True
          )
          assert acc_score >= 0.68
  
      else:
          cuml_mod = cuRFR_mg(
              n_estimators=n_estimators,
              max_depth=8,
              n_bins=16,
              ignore_empty_partitions=True,
          )
          cuml_mod.fit(
              X_train_df, y_train_df, broadcast_data=fit_broadcast
          )
          cuml_mod_predict = cuml_mod.predict(
              X_test_dask_array, broadcast_data=transform_broadcast
          )
  
          cuml_mod_predict = cuml_mod_predict.compute()
          cuml_mod_predict = cp.asnumpy(cuml_mod_predict)
          acc_score = r2_score(cuml_mod_predict, y_test)
          assert acc_score >= 0.72
  
      if transform_broadcast:
          assert cuml_mod.internal_model is None
  
imports: from dask.distributed import Client
  from sklearn.ensemble import RandomForestClassifier
  from sklearn.metrics import accuracy_score, r2_score, mean_squared_error
  from sklearn.model_selection import train_test_split
  from sklearn.datasets import make_regression, make_classification
  from dask.array import from_array
  from cuml.ensemble import RandomForestRegressor
  from cuml.ensemble import RandomForestClassifier
  from cuml.dask.common import utils
  from cuml.dask.ensemble import RandomForestRegressor
  from cuml.dask.ensemble import RandomForestClassifier
  from cuml.internals.safe_imports import cpu_only_import
  import json
  import pytest
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 13 for calling a global function with example usage: test_rf_broadcast(model_type, fit_broadcast, transform_broadcast, client) without return types