code: def broadcast(src: Tensor, ref: Tensor, dim: int) -> Tensor:
      size = ((1,) * dim) + (-1,) + ((1,) * (ref.dim() - dim - 1))
      return src.view(size).expand_as(ref)
  
file_path: pytorch_geometric/torch_geometric/utils/_scatter.py
imports: from typing import Optional
  import torch
  from torch import Tensor
  import torch_geometric.typing
  from torch_geometric import is_compiling, warnings
  from torch_geometric.typing import torch_scatter
  from torch_geometric.utils.functions import cumsum
label_desc: Use image node_id 1 for calling a global function with example usage: broadcast(src, ref, dim) and returns: src