code: def test_composite_parse_function_with_attributes(
      self, graph_text: str, expected_attribute: dict
  ) -> None:
      default_alpha = 1.67326319217681884765625
      default_gamma = 1.05070102214813232421875
  
      def expect_custom_node_attribute(node, attributes):
          for key in attributes:
              match_attr = [
                  attr for attr in node.attribute if attr.name == key
              ]
              assert len(match_attr) == 1
              assert match_attr[0].f == attributes[key]
  
      def expect_model_function_attribute(model):
          assert len(model.functions[0].attribute_proto) == 2
          attr_proto_alpha = [
              attr_proto
              for attr_proto in model.functions[0].attribute_proto
              if attr_proto.name == "alpha"
          ]
          assert (
              len(attr_proto_alpha) == 1
              and attr_proto_alpha[0].f == default_alpha
          )
          attr_proto_gamma = [
              attr_proto
              for attr_proto in model.functions[0].attribute_proto
              if attr_proto.name == "gamma"
          ]
          assert (
              len(attr_proto_gamma) == 1
              and attr_proto_gamma[0].f == default_gamma
          )
  
      function_text = f"""
           <
           domain: "custom_domain",
           opset_import: [ "" : 15],
           doc_string: "Test function proto"
           >
             Selu
             <alpha: float={default_alpha}, gamma: float={default_gamma}>
             (X) => (C)
             {{
                 constant_alpha = Constant<value_float: float=@alpha>()
                 constant_gamma = Constant<value_float: float=@gamma>()
                 alpha_x = CastLike(constant_alpha, X)
                 gamma_x = CastLike(constant_gamma, X)
                 exp_x = Exp(X)
                 alpha_x_exp_x = Mul(alpha_x, exp_x)
                 alpha_x_exp_x_ = Sub(alpha_x_exp_x, alpha_x)
                 neg = Mul(gamma_x, alpha_x_exp_x_)
                 pos = Mul(gamma_x, X)
                 _zero = Constant<value_float=0.0>()
                 zero = CastLike(_zero, X)
                 less_eq = LessOrEqual(X, zero)
                 C = Where(less_eq, neg, pos)
             }}
          """
  
      functions = [onnx.parser.parse_function(function_text)]
      graph = onnx.parser.parse_graph(graph_text)
      opset_imports = [
          OperatorSetIdProto(domain="", version=15),
          OperatorSetIdProto(domain="custom_domain", version=1),
      ]
  
      model = onnx.helper.make_model(
          graph, functions=functions, opset_imports=opset_imports
      )
      checker.check_model(model)
  
      expect_model_function_attribute(model)
      expect_custom_node_attribute(
          model.graph.node[0], expected_attribute
      )
  
file_path: onnx/onnx/test/parser_test.py
imports: import unittest
  from parameterized import parameterized
  import onnx
  from onnx import GraphProto, OperatorSetIdProto, checker
label_desc: Use image node_id 7 for calling the TestBasicFunctions obj's underlying member method code with example usage: obj.test_composite_parse_function_with_attributes(graph_text, expected_attribute) without return types