code: def convert_chains_models(
      model: SklearnModel,
      X_s: List[np.ndarray],
      y_s: List[np.ndarray],
      chains: List[Chain],
  ) -> List[SklearnModel]:
      n_chains = model.n_chains
  
      grouped_chains = []
      for i, x in enumerate(chains):
          if i % n_chains == 0:
              grouped_chains.append([])
          grouped_chains[-1].append(x)
  
      return [
          model.from_extract(chain, x, y)
          for (chain, (x, y)) in zip(grouped_chains, zip(X_s, y_s))
      ]
  
file_path: imodels/imodels/experimental/bartpy/runner.py
imports: from copy import deepcopy
  from typing import List
  import numpy
  from joblib import Parallel
  from .samplers.modelsampler import Chain
  from .sklearnmodel import SklearnModel
label_desc: Use image node_id 1 for calling a global function with example usage: convert_chains_models(model, X_s, y_s, chains) and returns: unknown