def METHOD_NAME(test_case):
    device = random_device()
    input = random_tensor(ndim=2, dim0=2, dim1=2).to(device)
    src = oneof(3.14, random_tensor(ndim=2, dim0=2, dim1=2).to(device))
    inplace = oneof(True, False)
    dim = oneof(0, 1, -1)
    if inplace:
        y = input + 1
        y.scatter_(dim, oneof(*_get_indexes(device)), src)
        return y
    return input.scatter(dim, oneof(*_get_indexes(device)), src)