def METHOD_NAME(size, duplications, shape, dtype=torch.float):
    tensor = torch.tensor(range(size), dtype=dtype)
    tensor = torch.cat(tuple(tensor for _ in range(duplications)))
    tensor = torch.reshape(tensor, shape)
    return tensor