parameters: (self, file_path: str, error_msg: str)
docstring: Writes error message to the file.
docstring_summary: Writes error message to the file.
docstring_tokens: Writes error message to the file .
function: def _write_error_file(self, file_path: str, error_msg: str) -> None:
          """
          Writes error message to the file.
          """
          try:
              with open(file_path, "w") as fp:
                  fp.write(error_msg)
          except Exception as e:
              warnings.warn(f"Unable to write error to file. {type(e).__name__}: {e}")
function_tokens: def _write_error_file ( self , file_path : str , error_msg : str ) -> None : try : with open ( file_path , "w" ) as fp : fp . write ( error_msg ) except Exception as e : warnings . warn ( f"Unable to write error to file. {type(e).__name__}: {e}" )