code: def __init__(
      self,
      filename=None,
      directory=None,
      format=None,
      engine=None,
      encoding=backend.ENCODING,
  ):
      if filename is None:
          name = getattr(self, "name", None) or self.__class__.__name__
          filename = f"{name}.{self._default_extension}"
      self.filename = filename
  
      if directory is not None:
          self.directory = directory
  
      if format is not None:
          self.format = format
  
      if engine is not None:
          self.engine = engine
  
      self.encoding = encoding
  
imports: import codecs
  import locale
  import logging
  import os
  from .None import backend
  from .None import tools
label_desc: Use image node_id 1 to create a new File object from inherited base classes: Base with example: obj = File(filename, directory, format, engine, encoding)