class_docstr: Convert evaluate result json to DataFrame for report generator,
  and analysis model robustness according to linguistic classification.
  
  Example::
  
      {
          "model_name": "BERT",
          "dataset_name": "medical data",
          "transformation": {
              "Case": {
                  "ori_precision": 0.70,
                  "trans_precision": 0.65,
                  "ori_f1": 0.63,
                  "trans_f1": 0.60,
                  "size": 5000,
              },
              "Ocr": {
                  "ori_precision": 0.72,
                  "trans_precision": 0.43,
                  "ori_f1": 0.62,
                  "trans_f1": 0.41,
                  "size": 5000,
              }
          },
          "subpopulation": {
              "LengthLengthSubPopulation-0.0-0.1": {
                  "trans_precision": 0.68,
                  "trans_f1": 0.63,
                  "size": 500
              }
          },
          "attack": {
              "Bert-Attack": {
                  "ori_precision": 0.72,
                  "trans_precision": 0.43,
                  "ori_f1": 0.62,
                  "trans_f1": 0.41,
                  "size": 400,
              }
          }
      }
docstr: Parsing evaluate json and classify each transformation.
  
  :param dict evaluate_json: evaluate result of specific model.
  :param str metric: key metric to plot subburst figure.
  :return: pandas.DataFrame, dict
docstr_tok: ["Parsing","evaluate","json","and","classify","each","transformation",".",":","param","dict","evaluate_json",":","evaluate","result","of","specific","model",".",":","param","str","metric",":","key","metric","to","plot","subburst","figure",".",":","return",":","pandas.DataFrame",",","dict"]
code: def json_to_sunburst(evaluate_json, metric=None):
      r"""
      Parsing evaluate json and classify each transformation.
  
      :param dict evaluate_json: evaluate result of specific model.
      :param str metric: key metric to plot subburst figure.
      :return: pandas.DataFrame, dict
  
      """
      if "transformation" not in evaluate_json:
          logger.info(
              (
                  "Cant find transformation in given json, "
                  "skip sunburst report generation!"
              )
          )
          return None, None
  
      transformations = evaluate_json["transformation"]
      metric = Analyzer.get_metric(transformations, metric)
      sunburst_list = []
      hover_data = None
  
      for transformation in transformations:
          trans_json = deepcopy(transformations[transformation])
          trans_json["transformation"] = transformation
          trans_json["parent"] = Analyzer.get_parent(transformation)
          sunburst_list.append(trans_json)
          if not hover_data:
              hover_data = [
                  key for key in transformations[transformation].keys()
              ]
      if metric in hover_data:
          hover_data.remove(metric)
  
      df = pd.DataFrame.from_dict(sunburst_list, orient="columns")
  
      sunburst_settings = {
          "path": ["parent", "transformation"],
          "color": metric,
          "values": "size",
          "hover_data": hover_data,
          "color_continuous_scale": "RdBu",
          "color_continuous_midpoint": np.average(df[metric]),
      }
  
      return df, sunburst_settings
  
imports: import pandas
  import numpy
  from functools import reduce
  from copy import deepcopy
  from collections import OrderedDict
  from ...common.utils import logger
label_desc: Use image node_id 2 for calling the Analyzer obj's underlying member method code with example usage: obj.json_to_sunburst(evaluate_json, metric) and returns: df,  sunburst_settings, None,  None