code: def test_grouptimeseriessplit_with_gridsearch(valid_n_splits):
      X_train = np.random.randint(1, 1000, size=100)
      y_train = np.random.randint(1, 1000, size=100)
      groups_train = np.random.randint(0, 10, size=100)
  
      # X_train, y_train, groups_train = init_data
      X_train = X_train.reshape(-1, 1)
      cv_splits = GroupTimeSeriesSplit(valid_n_splits).split(
          X_train, y_train, groups_train
      )
      Lasso(random_state=0, tol=0.1, alpha=0.8).fit(
          X_train, y_train, groups_train
      )
      pipe = Pipeline([("reg", Lasso(random_state=0, tol=0.1))])
      alphas = [0.1, 0.5, 0.8]
      grid = GridSearchCV(pipe, {"reg__alpha": alphas}, cv=cv_splits)
      grid.fit(X_train, y_train)
      best_C = grid.best_estimator_.get_params()["reg__alpha"]
      assert best_C
  
imports: import numpy
  import pandas
  import pytest
  from sklearn.linear_model import Lasso
  from sklearn.model_selection import GridSearchCV
  from sklearn.pipeline import Pipeline
  from sklego.model_selection import GroupTimeSeriesSplit
label_desc: Use image node_id 13 for calling a global function with example usage: test_grouptimeseriessplit_with_gridsearch(valid_n_splits) without return types