def METHOD_NAME(test_case):
    c = random(1, 6).to(int)
    h = random(1, 6).to(int)
    w = random(1, 6).to(int)
    pad = [0, 1, 2, 3]
    device = random_device()
    x = random_tensor(ndim=4, dim1=c, dim2=h, dim3=w).to(device)
    y = torch.nn.functional.pad(input=x, pad=pad, mode="replicate")
    return y