code: def get_preds(
      model: BasePipeline,
      user_ids: Union[np.array, torch.tensor],
      n_items: int,
      device: Union[str, torch.device],
  ) -> torch.tensor:
      """
      Returns a ``n_users x n_items`` tensor with the item IDs of recommended products for each user
      ID.
  
      Parameters
      ----------
      model: collie.model.BasePipeline
          Model that can take a (user_id, item_id) pair as input and return a recommendation score
      user_ids: np.array or torch.tensor
          Iterable[int] of users to score
      n_items: int
          Number of items in the training data
      device: string
          Device torch should use
  
      Returns
      -------
      predicted_scores: torch.tensor
          Tensor of shape ``n_users x n_items``
  
      """
      user, item = _get_user_item_pairs(user_ids, n_items, device)
  
      with torch.no_grad():
          predicted_scores = model(user, item)
  
      return predicted_scores.view(-1, n_items)
  
imports: from typing import Any, Callable, Iterable, List, Optional, Tuple, Union
  import warnings
  import numpy
  from scipy.sparse import csr_matrix
  import torch
  from torchmetrics import Metric
  from torchmetrics.functional import auroc
  from tqdm.auto import tqdm
  import collie
  from collie.interactions import ExplicitInteractions, Interactions, InteractionsDataLoader
  from collie.model import BasePipeline
label_desc: Use image node_id 2 for calling a global function with example usage: get_preds(model, user_ids, n_items, device) and returns: predicted_scores