code: def testLoadPlotsAsDataFrame(self):
      dfs = dataframe.plots_as_dataframes(self.plots_for_slice)
      expected = pd.DataFrame(
          {
              ("slices", "age"): [38.0, 38.0],
              ("slices", "sex"): [b"Female", b"Female"],
              ("plot_keys", "name"): ["", ""],
              ("plot_keys", "model_name"): ["", ""],
              ("plot_keys", "output_name"): ["", ""],
              ("plot_keys", "example_weighted"): [False, False],
              ("plot_data", "threshold"): [0.5, 0.5],
              ("plot_data", "false_negatives"): [10.0, 10.0],
              ("plot_data", "true_negatives"): [10.0, 10.0],
              ("plot_data", "false_positives"): [10.0, 10.0],
              ("plot_data", "true_positives"): [10.0, 10.0],
              ("plot_data", "precision"): [0.9, 0.9],
              ("plot_data", "recall"): [0.8, 0.8],
              ("plot_data", "false_positive_rate"): [0.0, 0.0],
              ("plot_data", "f1"): [0.0, 0.0],
              ("plot_data", "accuracy"): [0.0, 0.0],
              ("plot_data", "false_omission_rate"): [0.0, 0.0],
          }
      )
      pd.testing.assert_frame_equal(
          expected, dfs.confusion_matrix_at_thresholds
      )
  
imports: import dataclasses
  import numpy
  import pandas
  import tensorflow
  from tensorflow_model_analysis.experimental import dataframe
  from tensorflow_model_analysis.proto import metrics_for_slice_pb2
  from google.protobuf import text_format
label_desc: Use image node_id 2 for calling the PlotsAsDataFrameTest obj's underlying member method code with example usage: obj.testLoadPlotsAsDataFrame() without return types