code: def test_matmul(a, b, c, d):
      torch.manual_seed(0)
      t1 = torch.rand(a, b, c).requires_grad_(True)
      t2 = torch.rand(a, c, d).requires_grad_(True)
  
      r1 = StdSemiring.matmul(t1, t2)
      r2 = StdSemiring.sum(
          StdSemiring.times(
              t1.unsqueeze(-2).view(a, b, 1, c),
              t2.transpose(-2, -1).unsqueeze(-3).view(a, 1, d, c),
          )
      )
      print(r1.shape, r2.shape, a, b, d)
      assert torch.isclose(r1, r2).all()
  
imports: import torch
  from hypothesis import given
  from hypothesis.strategies import integers
  from torch_struct import LogSemiring, CheckpointSemiring, CheckpointShardSemiring, KMaxSemiring, MaxSemiring, StdSemiring
label_desc: Use image node_id 3 for calling a global function with example usage: test_matmul(a, b, c, d) without return types