parameters: (self, filename, file_handle=None)
docstring: Main entry point - call with a filename and optionally the file handle to read from.
docstring_summary: Main entry point - call with a filename and optionally the file handle to read from.
docstring_tokens: Main entry point - call with a filename and optionally the file handle to read from .
function: def process_file(self, filename, file_handle=None):
          """Main entry point - call with a filename and optionally the file handle to read from."""
          if isinstance(filename, str):
              filename = Path(filename).resolve()
  
          self._filename = filename
  
          if file_handle:
              self._process_file_handle(file_handle)
          else:
              with self._filename.open('r', encoding='utf-8') as f:
                  self._process_file_handle(f)
function_tokens: def process_file ( self , filename , file_handle = None ) : if isinstance ( filename , str ) : filename = Path ( filename ) . resolve ( ) self . _filename = filename if file_handle : self . _process_file_handle ( file_handle ) else : with self . _filename . open ( 'r' , encoding = 'utf-8' ) as f : self . _process_file_handle ( f )