def METHOD_NAME():
    x_dict = {
        'paper': torch.rand((13, 128)),
        'author': torch.rand((5, 128)),
        'field_of_study': torch.rand((6, 128))
    }
    edge_index_dict = {
        ('author', 'writes', 'paper'):
        torch.tensor([[0, 1, 2, 3, 4], [0, 0, 1, 2, 2]]),
        ('paper', 'has_topic', 'field_of_study'):
        torch.tensor([[6, 7, 8, 9], [0, 0, 1, 1]])
    }
    num_sampled_nodes_dict = {
        'paper': [1, 2, 10],
        'author': [0, 2, 3],
        'field_of_study': [0, 2, 4]
    }
    num_sampled_edges_dict = {
        ('author', 'writes', 'paper'): [2, 3],
        ('paper', 'has_topic', 'field_of_study'): [0, 4]
    }
    x_dict, edge_index_dict, _ = trim_to_layer(
        layer=1,
        num_sampled_nodes_per_hop=num_sampled_nodes_dict,
        num_sampled_edges_per_hop=num_sampled_edges_dict,
        x=x_dict,
        edge_index=edge_index_dict,
    )
    assert list(edge_index_dict.keys()) == [('author', 'writes', 'paper')]
    assert torch.equal(edge_index_dict[('author', 'writes', 'paper')],
                       torch.tensor([[0, 1], [0, 0]]))
    assert x_dict['paper'].size() == (3, 128)
    assert x_dict['author'].size() == (2, 128)
    assert x_dict['field_of_study'].size() == (2, 128)