code: def test_dict_to_proto(self):
      self.assertEqual(
          proto_utils.dict_to_proto(
              self.test_dict, foo_pb2.TestProto()
          ),
          self.test_proto,
      )
      dict_with_obsolete_field = {
          "obsolete_field": 2,
          "string_value": "x",
      }
      self.assertEqual(
          proto_utils.dict_to_proto(
              dict_with_obsolete_field, foo_pb2.TestProto()
          ),
          foo_pb2.TestProto(string_value="x"),
      )
  
file_path: tfx/tfx/utils/proto_utils_test.py
imports: import tensorflow
  from tfx.utils import proto_utils
  from tfx.utils import test_case_utils
  from tfx.utils.testdata import foo_pb2
  from google.protobuf import any_pb2
  from google.protobuf import descriptor_pb2
label_desc: Use image node_id 6 for calling the ProtoUtilsTest obj's underlying member method code with example usage: obj.test_dict_to_proto() without return types