parameters: (filename: str, mode: str = "rb")
return_statement: return open(filename, mode)
docstring: Returns a file descriptor for the filename if that file exists,
      otherwise ``None``.
docstring_summary: Returns a file descriptor for the filename if that file exists,
      otherwise ``None``.
docstring_tokens: Returns a file descriptor for the filename if that file exists otherwise None .
function: def open_if_exists(filename: str, mode: str = "rb") -> t.Optional[t.IO]:
      """Returns a file descriptor for the filename if that file exists,
      otherwise ``None``.
      """
      if not os.path.isfile(filename):
          return None
  
      return open(filename, mode)
function_tokens: def open_if_exists ( filename : str , mode : str = "rb" ) -> t . Optional [ t . IO ] : if not os . path . isfile ( filename ) : return None return open ( filename , mode )