code: def matmul_size(a, b):
      size = [max(i, j) for i, j in zip(a.shape[:-2], b.shape[:-2])]
      size.append(a.shape[-2])
      size.append(b.shape[-1])
      return size
  
file_path: pytorch-struct/torch_struct/semirings/fast_semirings.py
imports: import torch
  import torch.distributions
  from .semirings import _BaseLog
  from .sample import _SampledLogSumExp
label_desc: Use image node_id 1 for calling a global function with example usage: matmul_size(a, b) and returns: size