def METHOD_NAME(test_case):
    device = random_device()
    emb_size = random(low=2) * 16
    emb_dim = random(low=2) * 16
    emb_shape = [emb_size, emb_dim]
    idx_ndim = random(high=4).to(int).value()
    idx_shape = [random(high=4) for i in range(idx_ndim)]
    weight = random_tensor(len(emb_shape), *emb_shape).to(device)
    indices = random_tensor(
        len(idx_shape), *idx_shape, low=0, high=emb_size, dtype=int
    ).to(device)
    y = torch.nn.functional.embedding(indices, weight)
    return y