code: def test_calc_preds():
      class DummyModel:
          def predict(self, X):
              return X * 2
  
      model = DummyModel()
      X = np.random.randn(100)
      pred_func = model.predict
      from_model = True
      predict_kwds = {}
  
      # Test when chunk_size is not provided
      preds = _calc_preds(model, X, pred_func, from_model, predict_kwds)
      assert np.array_equal(preds, X * 2)
  
      # Test various chunk sizes
      for chunk_size in [1, 10, 50, 100, 150]:
          preds = _calc_preds(
              model, X, pred_func, from_model, predict_kwds, chunk_size
          )
          assert np.array_equal(
              preds, X * 2
          ), f"Failed for chunk_size={chunk_size}"
  
      # Test from_model=False
      from_model = False
  
      def dummy_prec_func(model, X, **predict_kwds):
          return X * 3
  
      preds = _calc_preds(
          model, X, dummy_prec_func, from_model, predict_kwds
      )
      assert np.array_equal(preds, X * 3)
  
imports: import pandas
  import numpy
  import pytest
  from pdpbox.utils import FeatureInfo, _to_rgba, _check_col, _check_dataset, _make_list, _check_model, _check_classes, _check_memory_limit, _check_frac_to_plot, _calc_n_jobs, _get_string, _expand_params_for_interact, _calc_preds, _check_cluster_params, _check_plot_engine, _check_pdp_interact_plot_type
label_desc: Use image node_id 11 for calling a global function with example usage: test_calc_preds() and returns: unknown, unknown