code: def __init__(self):
      self.model = resnet18(pretrained=True).eval()
      self.preprocessor = transforms.Compose(
          [
              transforms.Resize(224),
              transforms.CenterCrop(224),
              transforms.ToTensor(),
              transforms.Lambda(
                  lambda t: t[:3, ...]
              ),  # remove alpha channel
              transforms.Normalize(
                  mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]
              ),
          ]
      )
  
file_path: ray/doc/source/serve/doc_code/tutorial_pytorch.py
imports: from ray import serve
  from io import BytesIO
  from PIL import Image
  from starlette.requests import Request
  from typing import Dict
  import torch
  from torchvision import transforms
  from torchvision.models import resnet18
label_desc: Use image node_id 1 to create a new ImageModel object  with example: obj = ImageModel()