class_docstr: A optimzied OxfordIIITPet using libjpeg_turbo to load jpg images.
class_docstr_tok: ["A","optimzied","OxfordIIITPet","using","libjpeg_turbo","to","load","jpg","images","."]
code: def _read_image_to_bytes(self, path: str):
      fd = open(path, "rb")
      img_str = fd.read()
      fd.close()
      return img_str
  
file_path: BigDL/python/nano/src/bigdl/nano/pytorch/vision/datasets/oxfordpet_datasets.py
imports: from typing import Union, Callable, Optional
  from turbojpeg import TurboJPEG, TJPF_GRAY
  import torchvision
  import cv2
  import os
  import numpy
  import torch
  from logging import warning
  from os.path import split, join, realpath
  from PIL import Image
  from typing import Any
label_desc: Use image node_id 2 for calling the OxfordIIITPet obj's underlying member method code with example usage: obj._read_image_to_bytes(path) and returns: img_str