code: def _get_evaluate_in_batches_device(model: BasePipeline):
      device = getattr(model, "device", None)
  
      if torch.cuda.is_available() and str(device) == "cpu":
          warnings.warn(
              "CUDA available but model device is set to CPU - is this desired?"
          )
  
      if device is None:
          if torch.cuda.is_available():
              warnings.warn(
                  "``model.device`` attribute is ``None``. Since GPU is available, putting model on "
                  "GPU."
              )
              device = "cuda:0"
          else:
              device = "cpu"
  
      return device
  
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 9 for calling a global function with example usage: _get_evaluate_in_batches_device(model) and returns: device