code: def setup(self):
      if torch.cuda.is_available():
          self._device = torch.device("cuda:0")
      elif (
          hasattr(torch.backends, "mps")
          and torch.backends.mps.is_available()
      ):
          self._device = torch.device("mps")
      else:
          self._device = torch.device("cpu")
      self._model = torchvision.models.resnet18(pretrained=True).to(
          self._device
      )
  
file_path: pytorch-lightning/examples/app/server_with_auto_scaler/app.py
imports: from typing import List
  import torch
  import torchvision
  from lightning.app import CloudCompute, LightningApp
  from pydantic import BaseModel
label_desc: Use image node_id 2 for calling the PyTorchServer obj's underlying member method code with example usage: obj.setup() without return types