docstr: Transform the instance of JpegImageFile into
  an instance of MpoImageFile.
  After the call, the JpegImageFile is extended
  to be an MpoImageFile.
  
  This is essentially useful when opening a JPEG
  file that reveals itself as an MPO, to avoid
  double call to _open.
docstr_tok: ["Transform","the","instance","of","JpegImageFile","into","an","instance","of","MpoImageFile",".","After","the","call",",","the","JpegImageFile","is","extended","to","be","an","MpoImageFile",".","This","is","essentially","useful","when","opening","a","JPEG","file","that","reveals","itself","as","an","MPO",",","to","avoid","double","call","to","_open","."]
code: def adopt(jpeg_instance, mpheader=None):
      """
      Transform the instance of JpegImageFile into
      an instance of MpoImageFile.
      After the call, the JpegImageFile is extended
      to be an MpoImageFile.
  
      This is essentially useful when opening a JPEG
      file that reveals itself as an MPO, to avoid
      double call to _open.
      """
      jpeg_instance.__class__ = MpoImageFile
      jpeg_instance._after_jpeg_open(mpheader)
      return jpeg_instance
  
file_path: catboost/contrib/python/Pillow/py2/PIL/MpoImagePlugin.py
imports: from .None import Image, ImageFile, JpegImagePlugin
  from ._binary import i16be
label_desc: Use image node_id 9 for calling the MpoImageFile obj's underlying member method code with example usage: obj.adopt(jpeg_instance, mpheader) and returns: jpeg_instance