import torch


def add_background(image):
    """
    Takes a processed image of 224x224 and place it on a 448x448 background

    - image (torch.Tensor) of size 224x224

    Returns:
    - upscaled_image (torch.Tensor) of size 448x448
    """
    sz = 224
    
    # pick a random position to place the image
    indices = torch.randint(0, sz+1, (2,))
    x = indices[0].item()
    y = indices[1].item()

    upscaled_image = torch.zeros((3, 448, 448))
    upscaled_image[..., x:x+sz, y:y+sz] = image

    return upscaled_image