import random


def random_xy_offset(small_size, big_size):
    """
    Get random left-top point for putting a small rect in a large rect.
    Args:
        small_size: (width, height)
        big_size: (width, height)

    Returns:

    """
    small_rect_width, small_rect_height = small_size
    big_rect_width, big_rect_height = big_size

    y_max_offset = 0
    if big_rect_height > small_rect_height:
        y_max_offset = big_rect_height - small_rect_height

    x_max_offset = 0
    if big_rect_width > small_rect_width:
        x_max_offset = big_rect_width - small_rect_width

    y_offset = 0
    if y_max_offset != 0:
        y_offset = random.randint(0, y_max_offset)

    x_offset = 0
    if x_max_offset != 0:
        x_offset = random.randint(0, x_max_offset)

    return x_offset, y_offset