code: def test_tensor_layout_attr(index_dtype_override, expected):
      k = te.reduce_axis((0, 128), "k")
      A = te.placeholder((128, 128), name="A")
      B = te.placeholder((128, 128), name="B")
      C = te.compute(
          (128, 128),
          lambda x, y: te.sum(A[x, k] * B[y, k], axis=k),
          name="C",
          attrs={"layout_free_placeholders": [B]},
      )
      D = te.compute(
          (128, 128),
          lambda x, y: C[x, y] + 1,
          name="D",
          attrs={"layout_free_placeholders": [C]},
      )
      func = te.create_prim_func(
          [A, B, D], index_dtype_override=index_dtype_override
      )
      tvm.ir.assert_structural_equal(func, expected)
  
imports: import numpy
  import tvm
  import tvm.testing
  from tvm import te, tir, topi, relay
  from tvm.script import tir
  import pytest
label_desc: Use image node_id 32 for calling a global function with example usage: test_tensor_layout_attr(index_dtype_override, expected) without return types