code: def get_deterministic_model_multi_samples(
      weights: List[Tensor],
      bases: List[RandomFourierFeatures],
  ) -> GenericDeterministicModel:
      """
      Get a batched deterministic model that batch evaluates `n_samples` function
      samples. This supports multi-output models as well.
  
      Args:
          weights: A list of weights with `num_outputs` elements. Each weight is of
              shape `(batch_shape_input) x n_samples x num_rff_features`, where
              `(batch_shape_input)` is the batch shape of the inputs used to obtain the
              posterior weights.
          bases: A list of `RandomFourierFeatures` with `num_outputs` elements. Each
              basis has a sample shape of `n_samples`.
          n_samples: The number of function samples.
  
      Returns:
          A batched `GenericDeterministicModel`s that batch evaluates `n_samples`
          function samples.
      """
      eval_callables = [
          get_eval_gp_sample_callable(w=w, basis=basis)
          for w, basis in zip(weights, bases)
      ]
  
      def evaluate_gps_X(X):
          return torch.cat([_f(X) for _f in eval_callables], dim=-1)
  
      return GenericDeterministicModel(
          f=evaluate_gps_X,
          num_outputs=len(weights),
      )
  
imports: from __future__ import annotations
  from copy import deepcopy
  from math import pi
  from typing import List, Optional
  import torch
  from botorch.models.converter import batched_to_model_list
  from botorch.models.deterministic import GenericDeterministicModel
  from botorch.models.model import Model, ModelList
  from botorch.models.model_list_gp_regression import ModelListGP
  from botorch.models.multitask import MultiTaskGP
  from botorch.utils.sampling import manual_seed
  from botorch.utils.transforms import is_ensemble
  from gpytorch.kernels import Kernel, MaternKernel, RBFKernel, ScaleKernel
  from linear_operator.utils.cholesky import psd_safe_cholesky
  from torch import Tensor
  from torch.distributions import MultivariateNormal
  from torch.nn import Module
label_desc: Use image node_id 1 for calling a global function with example usage: get_deterministic_model_multi_samples(weights, bases) and returns: GenericDeterministicModel, torch