code: def _update_exit_code_from_stats(cls, statistics: Statistics,
                                       app: Application):
          '''Set the current exit code based on the Statistics.'''
          for error_type in statistics.errors:
              exit_code = app.ERROR_CODE_MAP.get(error_type)
              if exit_code:
                  app.update_exit_code(exit_codef _update_exit_code_from_stats(cls, statistics: Statistics,
                                       app: Application):
          '''Set the current exit code based on the Statistics.'''
          for error_type in statistics.errors:
              exit_code = app.ERROR_CODE_MAP.get(error_type)
              if exit_code:
                  app.update_exit_code(exit_code)
docs: Set the current exit code based on the Statistics.