parameters: (message_dict, metric_pool)
docstring: Handle a message dictionary, dispatch request to add or report call
docstring_summary: Handle a message dictionary, dispatch request to add or report call
docstring_tokens: Handle a message dictionary dispatch request to add or report call
function: def handle_message(message_dict, metric_pool):
      """
      Handle a message dictionary, dispatch request to add or report call
      """
      endpoint = message_dict['endpoint']
      data = message_dict['data']
  
      if endpoint == 'add':
          add_metric(data['name'], data['type'], data['description'],
                     data.get('buckets', DEFAULT_BUCKETS), metric_pool)
      elif endpoint == 'report':
          report_metric(data['name'], data['data'], metric_pool)
function_tokens: def handle_message ( message_dict , metric_pool ) : endpoint = message_dict [ 'endpoint' ] data = message_dict [ 'data' ] if endpoint == 'add' : add_metric ( data [ 'name' ] , data [ 'type' ] , data [ 'description' ] , data . get ( 'buckets' , DEFAULT_BUCKETS ) , metric_pool ) elif endpoint == 'report' : report_metric ( data [ 'name' ] , data [ 'data' ] , metric_pool )