code: def test_constant_of_shape(self):
      # Test ConstantOfShape with input of onnx::Shape node.
      g = self.create_empty_graph()
      constant = self.insert_tensor_constant(g, torch.ones(1, 2, 3, 4))
      shape = g_op(g, "Shape", constant)
      constant_of_shape = g_op(
          g, "ConstantOfShape", shape, value_t=torch.tensor([2.0])
      )
      self.run_test(
          g,
          constant_of_shape.node(),
          expect_tensor("Float", shape=(1, 2, 3, 4)),
      )
  
imports: import io
  import numpy
  import onnx
  import pytorch_test_common
  import torch
  from pytorch_test_common import skipIfUnsupportedMinOpsetVersion
  from torch.onnx import _constants, utils
  from torch.onnx._globals import GLOBALS
  from torch.onnx._internal import jit_utils
  from torch.testing._internal import common_utils
label_desc: Use image node_id 6 for calling the TestONNXShapeInference obj's underlying member method code with example usage: obj.test_constant_of_shape() without return types