code: def test_fi_attribute(self):
      code = """
              <opset_import: [ "" : 18 ], domain: "local">
              CastTo <dtype> (x) => (y) {
                  y = Cast <to : int = @dtype> (x)
              }
          """
      dtype_6 = onnx.helper.make_attribute("dtype", 6)
      self._check(code, [float_type_], [dtype_6], [int32_type_])
  
      dtype_10 = onnx.helper.make_attribute("dtype", 10)
      self._check(code, [float_type_], [dtype_10], [float16_type_])
  
file_path: onnx/onnx/test/function_inference_test.py
imports: import unittest
  from typing import Sequence
  from shape_inference_test import TestShapeInferenceHelper
  import onnx
  import onnx.helper
  import onnx.parser
  import onnx.shape_inference
  from onnx import AttributeProto, TypeProto
label_desc: Use image node_id 4 for calling the TestFunctionInference obj's underlying member method code with example usage: obj.test_fi_attribute() without return types