code: def testConvertAttributionsProto(self):
      attributions_for_slice = text_format.Parse(
          """
        slice_key {}
        attributions_keys_and_values {
          key {
            name: "total_attributions"
          }
          values {
            key: "feature1"
            value: {
              double_value {
                value: 1.0
              }
            }
          }
          values {
            key: "feature2"
            value: {
              double_value {
                value: 2.0
              }
            }
          }
        }
        attributions_keys_and_values {
          key {
            name: "total_attributions"
            output_name: "output1"
            sub_key: {
              class_id: { value: 1 }
            }
          }
          values {
            key: "feature1"
            value: {
              double_value {
                value: 1.0
              }
            }
          }
        }""",
          metrics_for_slice_pb2.AttributionsForSlice(),
      )
  
      got = util.convert_attributions_proto_to_dict(
          attributions_for_slice, None
      )
      self.assertEqual(
          got,
          (
              (),
              {
                  "": {
                      "": {
                          "total_attributions": {
                              "feature2": {"doubleValue": 2.0},
                              "feature1": {"doubleValue": 1.0},
                          }
                      }
                  },
                  "output1": {
                      "classId:1": {
                          "total_attributions": {
                              "feature1": {"doubleValue": 1.0}
                          }
                      }
                  },
              },
          ),
      )
  
imports: import os
  import tensorflow
  from tensorflow_model_analysis import constants
  from tensorflow_model_analysis.eval_saved_model import testutil
  from tensorflow_model_analysis.proto import config_pb2
  from tensorflow_model_analysis.proto import metrics_for_slice_pb2
  from tensorflow_model_analysis.slicer.slicer_lib import OVERALL_SLICE_NAME
  from tensorflow_model_analysis.slicer.slicer_lib import SingleSliceSpec
  from tensorflow_model_analysis.view import util
  from tensorflow_model_analysis.view import view_types
  from google.protobuf import text_format
label_desc: Use image node_id 31 for calling the UtilTest obj's underlying member method code with example usage: obj.testConvertAttributionsProto() without return types