code: def predict(self, requests: BatchRequestModel):
      transforms = torchvision.transforms.Compose(
          [
              torchvision.transforms.Resize(224),
              torchvision.transforms.ToTensor(),
              torchvision.transforms.Normalize(
                  [0.485, 0.456, 0.406], [0.229, 0.224, 0.225]
              ),
          ]
      )
      images = []
      for request in requests.inputs:
          image = app.components.serve.types.image.Image.deserialize(
              request.image
          )
          image = transforms(image).unsqueeze(0)
          images.append(image)
      images = torch.cat(images)
      images = images.to(self._device)
      predictions = self._model(images)
      results = predictions.argmax(1).cpu().numpy().tolist()
      return BatchResponse(
          outputs=[{"prediction": pred} for pred in results]
      )
  
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 3 for calling the PyTorchServer obj's underlying member method code with example usage: obj.predict(requests) and returns: BatchResponse