docstr: internal: read more image data
  For premature EOF and LOAD_TRUNCATED_IMAGES adds EOI marker
  so libjpeg can finish decoding
docstr_tok: ["internal",":","read","more","image","data","For","premature","EOF","and","LOAD_TRUNCATED_IMAGES","adds","EOI","marker","so","libjpeg","can","finish","decoding"]
code: def load_read(self, read_bytes):
      """
      internal: read more image data
      For premature EOF and LOAD_TRUNCATED_IMAGES adds EOI marker
      so libjpeg can finish decoding
      """
      s = self.fp.read(read_bytes)
  
      if (
          not s
          and ImageFile.LOAD_TRUNCATED_IMAGES
          and not hasattr(self, "_ended")
      ):
          # Premature EOF.
          # Pretend file is finished adding EOI marker
          self._ended = True
          return b"\xFF\xD9"
  
      return s
  
imports: 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 2 for calling the JpegImageFile obj's underlying member method code with example usage: obj.load_read(read_bytes) and returns: s, bytes