code: def expand_left(ptr: Tensor, dim: int, dims: int) -> Tensor:
      for _ in range(dims + dim if dim < 0 else dim):
          ptr = ptr.unsqueeze(0)
      return ptr
  
file_path: pytorch_geometric/torch_geometric/nn/aggr/base.py
imports: from typing import Optional, Tuple
  import torch
  from torch import Tensor
  import torch_geometric.typing
  from torch_geometric import is_compiling
  from torch_geometric.experimental import disable_dynamic_shapes
  from torch_geometric.utils import scatter, segment, to_dense_batch
label_desc: Use image node_id 1 for calling a global function with example usage: expand_left(ptr, dim, dims) and returns: ptr