code: def test_minimal_1d_predicts(data_1d_single_group):
      model = bmb.Model(
          "y ~ 0 + hsgp(x, c=1.5, m=10)", data_1d_single_group
      )
      idata = model.fit(tune=500, draws=500, chains=2, random_seed=1234)
  
      new_data = pd.DataFrame({"x": np.linspace(0, 5, num=10)})
  
      # Mean: In-sample
      new_idata = model.predict(idata, inplace=False)
      assert new_idata.posterior["y_mean"].dims == (
          "chain",
          "draw",
          "y_obs",
      )
      assert new_idata.posterior["y_mean"].to_numpy().shape == (
          2,
          500,
          100,
      )
      assert new_idata.posterior["hsgp(x, c=1.5, m=10)"].dims == (
          "chain",
          "draw",
          "y_obs",
      )
      assert new_idata.posterior[
          "hsgp(x, c=1.5, m=10)"
      ].to_numpy().shape == (2, 500, 100)
  
      # Mean: Out-of-sample
      new_idata = model.predict(idata, data=new_data, inplace=False)
      assert new_idata.posterior["y_mean"].dims == (
          "chain",
          "draw",
          "y_obs",
      )
      assert new_idata.posterior["y_mean"].to_numpy().shape == (
          2,
          500,
          10,
      )
      assert new_idata.posterior["hsgp(x, c=1.5, m=10)"].dims == (
          "chain",
          "draw",
          "y_obs",
      )
      assert new_idata.posterior[
          "hsgp(x, c=1.5, m=10)"
      ].to_numpy().shape == (2, 500, 10)
  
      # Posterior predictive: In-sample
      new_idata = model.predict(idata, kind="pps", inplace=False)
      assert new_idata.posterior_predictive["y"].dims == (
          "chain",
          "draw",
          "y_obs",
      )
      assert new_idata.posterior_predictive["y"].to_numpy().shape == (
          2,
          500,
          100,
      )
  
      # Posterior predictive: Out-of-sample
      new_idata = model.predict(
          idata, data=new_data, kind="pps", inplace=False
      )
      assert new_idata.posterior_predictive["y"].dims == (
          "chain",
          "draw",
          "y_obs",
      )
      assert new_idata.posterior_predictive["y"].to_numpy().shape == (
          2,
          500,
          10,
      )
  
imports: import pathlib
  import re
  import bambi
  import numpy
  import pandas
  import pytest
label_desc: Use image node_id 18 for calling a global function with example usage: test_minimal_1d_predicts(data_1d_single_group) without return types