code: def isFile(self):
          
          try:
              filetype = file
          except NameError:
              filetype = io.IOBase
  
          return self._wrap(type(self.obj) is filetype)
docs: Check if the given object is a file