code: def _open(self):
      s = self.fp.read(3)
  
      if not _accept(s):
          msg = "not a JPEG file"
          raise SyntaxError(msg)
      s = b"\xFF"
  
      # Create attributes
      self.bits = self.layers = 0
  
      # JPEG specifics (internal)
      self.layer = []
      self.huffman_dc = {}
      self.huffman_ac = {}
      self.quantization = {}
      self.app = {}  # compatibility
      self.applist = []
      self.icclist = []
  
      while True:
          i = s[0]
          if i == 0xFF:
              s = s + self.fp.read(1)
              i = i16(s)
          else:
              # Skip non-0xFF junk
              s = self.fp.read(1)
              continue
  
          if i in MARKER:
              name, description, handler = MARKER[i]
              if handler is not None:
                  handler(self, i)
              if i == 0xFFDA:  # start of scan
                  rawmode = self.mode
                  if self.mode == "CMYK":
                      rawmode = "CMYK;I"  # assume adobe conventions
                  self.tile = [
                      ("jpeg", (0, 0) + self.size, 0, (rawmode, ""))
                  ]
                  # self.__offset = self.fp.tell()
                  break
              s = self.fp.read(1)
          elif i in {0, 0xFFFF}:
              # padded marker or junk; move on
              s = b"\xff"
          elif i == 0xFF00:  # Skip extraneous data (escaped 0xFF)
              s = self.fp.read(1)
          else:
              msg = "no marker found"
              raise SyntaxError(msg)
  
imports: from __future__ import annotations
  import array
  import io
  import math
  import os
  import struct
  import subprocess
  import sys
  import tempfile
  import warnings
  from .None import Image, ImageFile
  from ._binary import i16be
  from ._binary import i32be
  from ._binary import o8
  from ._binary import o16be
  from .JpegPresets import presets
label_desc: Use image node_id 1 for calling the JpegImageFile obj's underlying member method code with example usage: obj._open() without return types