code: def get_node_attr_value(node: NodeProto, attr_name: str) -> Any:
      matching = [x for x in node.attribute if x.name == attr_name]
      if len(matching) > 1:
          raise ValueError(
              f"Node has multiple attributes with name {attr_name}"
          )
      if len(matching) < 1:
          raise ValueError(
              f"Node has no attribute with name {attr_name}"
          )
      return get_attribute_value(matching[0])
  
imports: import collections.abc
  import numbers
  import struct
  from cmath import isnan
  from typing import Any, Callable, Dict, KeysView, List, Optional, Sequence, Tuple, TypeVar, Union, cast
  import google.protobuf.message
  import numpy
  from onnx import IR_VERSION, AttributeProto, FunctionProto, GraphProto, MapProto, ModelProto, NodeProto, OperatorSetIdProto, OptionalProto, SequenceProto, SparseTensorProto, TensorProto, TensorShapeProto, TrainingInfoProto, TypeProto, ValueInfoProto, defs, mapping, subbyte
label_desc: Use image node_id 25 for calling a global function with example usage: get_node_attr_value(node, attr_name) and returns: get_attribute_value