class_docstr: Python implementation of a format decoder. Override this class and
  add the decoding logic in the `decode` method.
  
  See :ref:`Writing Your Own File Decoder in Python<file-decoders-py>`
class_docstr_tok: ["Python","implementation","of","a","format","decoder",".","Override","this","class","and","add","the","decoding","logic","in","the","`","decode","`","method",".","See",":","ref",":","`","Writing","Your","Own","File","Decoder","in","Python","<","file-decoders-py",">","`"]
docstr: Called from ImageFile to set the python file-like object
  
  :param fd: A python file-like object
  :returns: None
docstr_tok: ["Called","from","ImageFile","to","set","the","python","file-like","object",":","param","fd",":","A","python","file-like","object",":","returns",":","None"]
code: def setfd(self, fd):
      """
      Called from ImageFile to set the python file-like object
  
      :param fd: A python file-like object
      :returns: None
      """
      self.fd = fd
  
imports: import io
  import struct
  import sys
  from .None import Image
  from ._util import isPath
label_desc: Use image node_id 6 for calling the PyDecoder obj's underlying member method code with example usage: obj.setfd(fd) without return types