def METHOD_NAME(self, x: Union[Tensor, OptPairTensor], edge_index: Adj,
            size: Size = None) -> Tensor:
    if isinstance(x, Tensor):
        x: OptPairTensor = (x, x)
    x_r = x[1]
    deg = x[0]  # Dummy.
    if isinstance(edge_index, SparseTensor):
        deg = edge_index.storage.rowcount()
    elif isinstance(edge_index, Tensor):
        i = 1 if self.flow == 'source_to_target' else 0
        N = x[0].size(self.node_dim)
        N = size[1] if size is not None else N
        N = x_r.size(self.node_dim) if x_r is not None else N
        deg = degree(edge_index[i], N, dtype=torch.long)
    deg.clamp_(max=self.max_degree)
    # propagate_type: (x: OptPairTensor)
    h = self.propagate(edge_index, x=x, size=size)
    out = h.new_empty(list(h.size())[:-1] + [self.out_channels])
    for i, (lin_l, lin_r) in enumerate(zip(self.lins_l, self.lins_r)):
        idx = (deg == i).nonzero().view(-1)
        r = lin_l(h.index_select(self.node_dim, idx))
        if x_r is not None:
            r = r + lin_r(x_r.index_select(self.node_dim, idx))
        out.index_copy_(self.node_dim, idx, r)
    return out