code: def smoke_test_torchvision_decode_jpeg(device: str = "cpu"):
      img_jpg_data = read_file(
          str(
              SCRIPT_DIR
              / "assets"
              / "encode_jpeg"
              / "grace_hopper_517x606.jpg"
          )
      )
      img_jpg = decode_jpeg(img_jpg_data, device=device)
      if img_jpg.shape != (3, 606, 517):
          raise RuntimeError(
              f"Unexpected shape of img_jpg: {img_jpg.shape}"
          )
  
file_path: vision/test/smoke_test.py
imports: import sys
  from pathlib import Path
  import torch
  import torchvision
  from torchvision.io import decode_jpeg, read_file, read_image
  from torchvision.models import resnet50, ResNet50_Weights
label_desc: Use image node_id 3 for calling a global function with example usage: smoke_test_torchvision_decode_jpeg(device) without return types