def METHOD_NAME():
    edge_index = torch.tensor([[0, 1, 0], [1, 0, 0]])
    edge_weight = torch.tensor([0.2, 0.3, 0.5])
    full_loop_weight = get_self_loop_attr(edge_index, edge_weight)
    assert full_loop_weight.tolist() == [0.5, 0.0]
    full_loop_weight = get_self_loop_attr(edge_index, edge_weight, num_nodes=4)
    assert full_loop_weight.tolist() == [0.5, 0.0, 0.0, 0.0]
    full_loop_weight = get_self_loop_attr(edge_index)
    assert full_loop_weight.tolist() == [1.0, 0.0]
    edge_attr = torch.tensor([[1.0, 0.0], [0.0, 1.0], [0.5, 1.0]])
    full_loop_attr = get_self_loop_attr(edge_index, edge_attr)
    assert full_loop_attr.tolist() == [[0.5, 1.0], [0.0, 0.0]]