import torch


def create_sudo_bound_box(scale: float) -> torch.Tensor:
    """Creates a square bound box around image center. scale controls the ratio by which the square is scaled.
    Scale 1.0 will return boundbox the size of freihand image.

    Args:
        scale (float): Scale factor for boundbox size

    Returns:
        torch.Tensor: A bound box of size [21,3]. The z axis is 1 and first two dimensions are corner points
            of boundbox in pixels.
    """
    max_bound = torch.tensor([224.0, 224.0])
    min_bound = torch.tensor([0.0, 0.0])
    c = (max_bound + min_bound) / 2.0
    s = ((max_bound - min_bound) / 2.0) * scale
    bound_box = torch.tensor(
        [[0, 0, 0]]
        + [[s[0], s[1], 1]] * 5
        + [[-s[0], s[1], 1]] * 5
        + [[s[0], -s[1], 1]] * 5
        + [[-s[0], -s[1], 1]] * 5
    ) + torch.tensor([c[0], c[1], 0])
    return bound_box.float()