prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Request: Please add "log_stats" to colored_logging handler
  ### Short Description
  
  Please add "log_stats" to colored_logging handler
  ### Possible solution
  
  The following line can be added to colored_logging_handler.py
  ### _'log_stats': 'magenta',_
  ### How it would help others
  
  It will be easy to track the progress with so many lines printed on the console between 2 status logs.
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `pokemongo_bot/event_handlers/colored_logging_handler.py`
  Content:
  ```
  1 # -*- coding: utf-8 -*-
  2 from __future__ import unicode_literals
  3 
  4 import logging
  5 
  6 from pokemongo_bot.event_manager import EventHandler
  7 
  8 
  9 class ColoredLoggingHandler(EventHandler):
  10     EVENT_COLOR_MAP = {
  11         'api_error':                         'red',
  12         'bot_exit':                          'red',
  13         'bot_start':                         'green',
  14         'catch_limit':                       'red',
  15         'config_error':                      'red',
  16         'egg_already_incubating':            'yellow',
  17         'egg_hatched':                       'green',
  18         'future_pokemon_release':            'yellow',
  19         'incubate':                          'green',
  20         'incubator_already_used':            'yellow',
  21         'inventory_full':                    'yellow',
  22         'item_discard_fail':                 'red',
  23         'item_discarded':                    'green',
  24         'keep_best_release':                 'green',
  25         'level_up':                          'green',
  26         'level_up_reward':                   'green',
  27         'location_cache_error':              'yellow',
  28         'location_cache_ignored':            'yellow',
  29         'login_failed':                      'red',
  30         'login_successful':                  'green',
  31         'lucky_egg_error':                   'red',
  32         'move_to_map_pokemon_encounter':     'green',
  33         'move_to_map_pokemon_fail':          'red',
  34         'next_egg_incubates':                'yellow',
  35         'next_sleep':                        'green',
  36         'next_random_pause':                 'green',
  37         'no_pokeballs':                      'red',
  38         'pokemon_appeared':                  'yellow',
  39         'pokemon_capture_failed':            'red',
  40         'pokemon_caught':                    'blue',
  41         'pokemon_evolved':                   'green',
  42         'pokemon_fled':                      'red',
  43         'pokemon_inventory_full':            'red',
  44         'pokemon_nickname_invalid':          'red',
  45         'pokemon_not_in_range':              'yellow',
  46         'pokemon_release':                   'green',
  47         'pokemon_vanished':                  'red',
  48         'pokestop_empty':                    'yellow',
  49         'pokestop_searching_too_often':      'yellow',
  50         'rename_pokemon':                    'green',
  51         'skip_evolve':                       'yellow',
  52         'softban':                           'red',
  53         'spun_pokestop':                     'cyan',
  54         'threw_berry_failed':                'red',
  55         'unknown_spin_result':               'red',
  56         'unset_pokemon_nickname':            'red',
  57         'vip_pokemon':                       'red',
  58 
  59         # event names for 'white' still here to remember that these events are already determined its color.
  60         'arrived_at_cluster':                'white',
  61         'arrived_at_fort':                   'white',
  62         'bot_sleep':                         'white',
  63         'bot_random_pause':                  'white',
  64         'catchable_pokemon':                 'white',
  65         'found_cluster':                     'white',
  66         'incubate_try':                      'white',
  67         'load_cached_location':              'white',
  68         'location_found':                    'white',
  69         'login_started':                     'white',
  70         'lured_pokemon_found':               'white',
  71         'move_to_map_pokemon_move_towards':  'white',
  72         'move_to_map_pokemon_teleport_back': 'white',
  73         'move_to_map_pokemon_updated_map':   'white',
  74         'moving_to_fort':                    'white',
  75         'moving_to_lured_fort':              'white',
  76         'pokemon_catch_rate':                'white',
  77         'pokemon_evolve_fail':               'white',
  78         'pokestop_on_cooldown':              'white',
  79         'pokestop_out_of_range':             'white',
  80         'polyline_request':                  'white',
  81         'position_update':                   'white',
  82         'set_start_location':                'white',
  83         'softban_fix':                       'white',
  84         'softban_fix_done':                  'white',
  85         'spun_fort':                         'white',
  86         'threw_berry':                       'white',
  87         'threw_pokeball':                    'white',
  88         'used_lucky_egg':                    'white'
  89     }
  90     CONTINUOUS_EVENT_NAMES = [
  91         'catchable_pokemon',
  92         'moving_to_lured_fort',
  93         'spun_fort'
  94     ]
  95     COLOR_CODE = {
  96         'gray':    '\033[90m',
  97         'red':     '\033[91m',
  98         'green':   '\033[92m',
  99         'yellow':  '\033[93m',
  100         'blue':    '\033[94m',
  101         'magenta': '\033[95m',
  102         'cyan':    '\033[96m',
  103         'white':   '\033[97m',
  104         'reset':   '\033[0m'
  105     }
  106 
  107     def handle_event(self, event, sender, level, formatted_msg, data):
  108         logger = logging.getLogger(type(sender).__name__)
  109 
  110         color = self.COLOR_CODE['white']
  111         if event in self.EVENT_COLOR_MAP:
  112             color = self.COLOR_CODE[self.EVENT_COLOR_MAP[event]]
  113         if event == 'egg_hatched' and data.get('pokemon', 'error') == 'error':
  114             color = self.COLOR_CODE['red']
  115         formatted_msg = '{}{}{}'.format(color, formatted_msg, self.COLOR_CODE['reset'])
  116 
  117         if formatted_msg:
  118             message = "[{}] {}".format(event, formatted_msg)
  119         else:
  120             message = '{}: {}'.format(event, str(data))
  121         getattr(logger, level)(message)
  122
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/pokemongo_bot/event_handlers/colored_logging_handler.py b/pokemongo_bot/event_handlers/colored_logging_handler.py
  --- a/pokemongo_bot/event_handlers/colored_logging_handler.py
  +++ b/pokemongo_bot/event_handlers/colored_logging_handler.py
  @@ -55,6 +55,8 @@
           'unknown_spin_result':               'red',
           'unset_pokemon_nickname':            'red',
           'vip_pokemon':                       'red',
  +        'log_stats':                         'magenta',
  +        'show_inventory':                    'magenta',
   
           # event names for 'white' still here to remember that these events are already determined its color.
           'arrived_at_cluster':                'white',
  
verification_info: {"golden_diff": "diff --git a/pokemongo_bot/event_handlers/colored_logging_handler.py b/pokemongo_bot/event_handlers/colored_logging_handler.py\n--- a/pokemongo_bot/event_handlers/colored_logging_handler.py\n+++ b/pokemongo_bot/event_handlers/colored_logging_handler.py\n@@ -55,6 +55,8 @@\n         'unknown_spin_result':               'red',\n         'unset_pokemon_nickname':            'red',\n         'vip_pokemon':                       'red',\n+        'log_stats':                         'magenta',\n+        'show_inventory':                    'magenta',\n \n         # event names for 'white' still here to remember that these events are already determined its color.\n         'arrived_at_cluster':                'white',\n", "issue": "Request: Please add \"log_stats\" to colored_logging handler\n### Short Description\n\nPlease add \"log_stats\" to colored_logging handler\n### Possible solution\n\nThe following line can be added to colored_logging_handler.py\n### _'log_stats': 'magenta',_\n### How it would help others\n\nIt will be easy to track the progress with so many lines printed on the console between 2 status logs.\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nimport logging\n\nfrom pokemongo_bot.event_manager import EventHandler\n\n\nclass ColoredLoggingHandler(EventHandler):\n    EVENT_COLOR_MAP = {\n        'api_error':                         'red',\n        'bot_exit':                          'red',\n        'bot_start':                         'green',\n        'catch_limit':                       'red',\n        'config_error':                      'red',\n        'egg_already_incubating':            'yellow',\n        'egg_hatched':                       'green',\n        'future_pokemon_release':            'yellow',\n        'incubate':                          'green',\n        'incubator_already_used':            'yellow',\n        'inventory_full':                    'yellow',\n        'item_discard_fail':                 'red',\n        'item_discarded':                    'green',\n        'keep_best_release':                 'green',\n        'level_up':                          'green',\n        'level_up_reward':                   'green',\n        'location_cache_error':              'yellow',\n        'location_cache_ignored':            'yellow',\n        'login_failed':                      'red',\n        'login_successful':                  'green',\n        'lucky_egg_error':                   'red',\n        'move_to_map_pokemon_encounter':     'green',\n        'move_to_map_pokemon_fail':          'red',\n        'next_egg_incubates':                'yellow',\n        'next_sleep':                        'green',\n        'next_random_pause':                 'green',\n        'no_pokeballs':                      'red',\n        'pokemon_appeared':                  'yellow',\n        'pokemon_capture_failed':            'red',\n        'pokemon_caught':                    'blue',\n        'pokemon_evolved':                   'green',\n        'pokemon_fled':                      'red',\n        'pokemon_inventory_full':            'red',\n        'pokemon_nickname_invalid':          'red',\n        'pokemon_not_in_range':              'yellow',\n        'pokemon_release':                   'green',\n        'pokemon_vanished':                  'red',\n        'pokestop_empty':                    'yellow',\n        'pokestop_searching_too_often':      'yellow',\n        'rename_pokemon':                    'green',\n        'skip_evolve':                       'yellow',\n        'softban':                           'red',\n        'spun_pokestop':                     'cyan',\n        'threw_berry_failed':                'red',\n        'unknown_spin_result':               'red',\n        'unset_pokemon_nickname':            'red',\n        'vip_pokemon':                       'red',\n\n        # event names for 'white' still here to remember that these events are already determined its color.\n        'arrived_at_cluster':                'white',\n        'arrived_at_fort':                   'white',\n        'bot_sleep':                         'white',\n        'bot_random_pause':                  'white',\n        'catchable_pokemon':                 'white',\n        'found_cluster':                     'white',\n        'incubate_try':                      'white',\n        'load_cached_location':              'white',\n        'location_found':                    'white',\n        'login_started':                     'white',\n        'lured_pokemon_found':               'white',\n        'move_to_map_pokemon_move_towards':  'white',\n        'move_to_map_pokemon_teleport_back': 'white',\n        'move_to_map_pokemon_updated_map':   'white',\n        'moving_to_fort':                    'white',\n        'moving_to_lured_fort':              'white',\n        'pokemon_catch_rate':                'white',\n        'pokemon_evolve_fail':               'white',\n        'pokestop_on_cooldown':              'white',\n        'pokestop_out_of_range':             'white',\n        'polyline_request':                  'white',\n        'position_update':                   'white',\n        'set_start_location':                'white',\n        'softban_fix':                       'white',\n        'softban_fix_done':                  'white',\n        'spun_fort':                         'white',\n        'threw_berry':                       'white',\n        'threw_pokeball':                    'white',\n        'used_lucky_egg':                    'white'\n    }\n    CONTINUOUS_EVENT_NAMES = [\n        'catchable_pokemon',\n        'moving_to_lured_fort',\n        'spun_fort'\n    ]\n    COLOR_CODE = {\n        'gray':    '\\033[90m',\n        'red':     '\\033[91m',\n        'green':   '\\033[92m',\n        'yellow':  '\\033[93m',\n        'blue':    '\\033[94m',\n        'magenta': '\\033[95m',\n        'cyan':    '\\033[96m',\n        'white':   '\\033[97m',\n        'reset':   '\\033[0m'\n    }\n\n    def handle_event(self, event, sender, level, formatted_msg, data):\n        logger = logging.getLogger(type(sender).__name__)\n\n        color = self.COLOR_CODE['white']\n        if event in self.EVENT_COLOR_MAP:\n            color = self.COLOR_CODE[self.EVENT_COLOR_MAP[event]]\n        if event == 'egg_hatched' and data.get('pokemon', 'error') == 'error':\n            color = self.COLOR_CODE['red']\n        formatted_msg = '{}{}{}'.format(color, formatted_msg, self.COLOR_CODE['reset'])\n\n        if formatted_msg:\n            message = \"[{}] {}\".format(event, formatted_msg)\n        else:\n            message = '{}: {}'.format(event, str(data))\n        getattr(logger, level)(message)\n", "path": "pokemongo_bot/event_handlers/colored_logging_handler.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nimport logging\n\nfrom pokemongo_bot.event_manager import EventHandler\n\n\nclass ColoredLoggingHandler(EventHandler):\n    EVENT_COLOR_MAP = {\n        'api_error':                         'red',\n        'bot_exit':                          'red',\n        'bot_start':                         'green',\n        'catch_limit':                       'red',\n        'config_error':                      'red',\n        'egg_already_incubating':            'yellow',\n        'egg_hatched':                       'green',\n        'future_pokemon_release':            'yellow',\n        'incubate':                          'green',\n        'incubator_already_used':            'yellow',\n        'inventory_full':                    'yellow',\n        'item_discard_fail':                 'red',\n        'item_discarded':                    'green',\n        'keep_best_release':                 'green',\n        'level_up':                          'green',\n        'level_up_reward':                   'green',\n        'location_cache_error':              'yellow',\n        'location_cache_ignored':            'yellow',\n        'login_failed':                      'red',\n        'login_successful':                  'green',\n        'lucky_egg_error':                   'red',\n        'move_to_map_pokemon_encounter':     'green',\n        'move_to_map_pokemon_fail':          'red',\n        'next_egg_incubates':                'yellow',\n        'next_sleep':                        'green',\n        'next_random_pause':                 'green',\n        'no_pokeballs':                      'red',\n        'pokemon_appeared':                  'yellow',\n        'pokemon_capture_failed':            'red',\n        'pokemon_caught':                    'blue',\n        'pokemon_evolved':                   'green',\n        'pokemon_fled':                      'red',\n        'pokemon_inventory_full':            'red',\n        'pokemon_nickname_invalid':          'red',\n        'pokemon_not_in_range':              'yellow',\n        'pokemon_release':                   'green',\n        'pokemon_vanished':                  'red',\n        'pokestop_empty':                    'yellow',\n        'pokestop_searching_too_often':      'yellow',\n        'rename_pokemon':                    'green',\n        'skip_evolve':                       'yellow',\n        'softban':                           'red',\n        'spun_pokestop':                     'cyan',\n        'threw_berry_failed':                'red',\n        'unknown_spin_result':               'red',\n        'unset_pokemon_nickname':            'red',\n        'vip_pokemon':                       'red',\n        'log_stats':                         'magenta',\n        'show_inventory':                    'magenta',\n\n        # event names for 'white' still here to remember that these events are already determined its color.\n        'arrived_at_cluster':                'white',\n        'arrived_at_fort':                   'white',\n        'bot_sleep':                         'white',\n        'bot_random_pause':                  'white',\n        'catchable_pokemon':                 'white',\n        'found_cluster':                     'white',\n        'incubate_try':                      'white',\n        'load_cached_location':              'white',\n        'location_found':                    'white',\n        'login_started':                     'white',\n        'lured_pokemon_found':               'white',\n        'move_to_map_pokemon_move_towards':  'white',\n        'move_to_map_pokemon_teleport_back': 'white',\n        'move_to_map_pokemon_updated_map':   'white',\n        'moving_to_fort':                    'white',\n        'moving_to_lured_fort':              'white',\n        'pokemon_catch_rate':                'white',\n        'pokemon_evolve_fail':               'white',\n        'pokestop_on_cooldown':              'white',\n        'pokestop_out_of_range':             'white',\n        'polyline_request':                  'white',\n        'position_update':                   'white',\n        'set_start_location':                'white',\n        'softban_fix':                       'white',\n        'softban_fix_done':                  'white',\n        'spun_fort':                         'white',\n        'threw_berry':                       'white',\n        'threw_pokeball':                    'white',\n        'used_lucky_egg':                    'white'\n    }\n    CONTINUOUS_EVENT_NAMES = [\n        'catchable_pokemon',\n        'moving_to_lured_fort',\n        'spun_fort'\n    ]\n    COLOR_CODE = {\n        'gray':    '\\033[90m',\n        'red':     '\\033[91m',\n        'green':   '\\033[92m',\n        'yellow':  '\\033[93m',\n        'blue':    '\\033[94m',\n        'magenta': '\\033[95m',\n        'cyan':    '\\033[96m',\n        'white':   '\\033[97m',\n        'reset':   '\\033[0m'\n    }\n\n    def handle_event(self, event, sender, level, formatted_msg, data):\n        logger = logging.getLogger(type(sender).__name__)\n\n        color = self.COLOR_CODE['white']\n        if event in self.EVENT_COLOR_MAP:\n            color = self.COLOR_CODE[self.EVENT_COLOR_MAP[event]]\n        if event == 'egg_hatched' and data.get('pokemon', 'error') == 'error':\n            color = self.COLOR_CODE['red']\n        formatted_msg = '{}{}{}'.format(color, formatted_msg, self.COLOR_CODE['reset'])\n\n        if formatted_msg:\n            message = \"[{}] {}\".format(event, formatted_msg)\n        else:\n            message = '{}: {}'.format(event, str(data))\n        getattr(logger, level)(message)\n", "path": "pokemongo_bot/event_handlers/colored_logging_handler.py"}]}