code: def broadcast(a, b):
      size = matmul_size(a, b)
      a = a.expand(*size[:-2], a.shape[-2], a.shape[-1])
      b = b.expand(*size[:-2], b.shape[-2], b.shape[-1])
      a2 = a.contiguous().view(-1, a.shape[-2], a.shape[-1])
      b2 = b.contiguous().view(-1, b.shape[-2], b.shape[-1])
      return a2, b2, 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 2 for calling a global function with example usage: broadcast(a, b) and returns: a2,  b2,  size