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: Get key metric of given transformations.
  
  :param dict transformations: evaluation result of transformation
  :param str metric: key metric to plot subburst figure.
  :return: str legal metric name
docstr_tok: ["Get","key","metric","of","given","transformations",".",":","param","dict","transformations",":","evaluation","result","of","transformation",":","param","str","metric",":","key","metric","to","plot","subburst","figure",".",":","return",":","str","legal","metric","name"]
code: def get_metric(transformations, metric=None):
      """
      Get key metric of given transformations.
  
      :param dict transformations: evaluation result of transformation
      :param str metric: key metric to plot subburst figure.
      :return: str legal metric name
  
      """
      if len(transformations) < 1:
          raise ValueError(
              f"Cant get metric of {transformations} to plot!"
          )
      if metric:
          assert isinstance(
              metric, str
          ), f"Cant recognize metric {metric}"
          metrics = [metric]
      else:
          metrics = []
  
      for transformation in transformations:
          original_result, transform_result = Analyzer.get_metrics(
              transformations[transformation]
          )
          if metrics:
              metrics = reduce(
                  lambda x, y: list(set(x).intersection(list(y))),
                  [
                      metrics,
                      original_result.keys(),
                      transform_result.keys(),
                  ],
              )
          else:
              metrics = list(original_result.keys())
      if len(metrics) < 1:
          raise ValueError(
              f"Failed to load metric value for "
              f"{transformations}, cuz lack of metric scores."
          )
      else:
          return "trans_" + metrics[0]
  
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 3 for calling the Analyzer obj's underlying member method code with example usage: obj.get_metric(transformations, metric) and returns: unknown