from typing import Tuple


def coco_to_percent(rect: Tuple[float, float, float, float], shape: Tuple[int, int]) -> Tuple[
    float, float, float, float]:
    """
    Args:
        rect: (x_min,y_min,x_max,y_max)
        shape: (x_net_len,h_net_len)
    Returns:
        (x_min,y_min,x_max,y_max)
        PS: but all belong to [0,1]
    """
    # print(f'[x_min,y_min,x_max,y_max] is {rect[0]} {rect[1]} {rect[2]} {rect[3]}')
    will_return = list(rect)
    will_return[0], will_return[2] = will_return[0] / shape[0], will_return[2] / shape[0]
    will_return[1], will_return[3] = will_return[1] / shape[1], will_return[3] / shape[1]
    # print(f'[x_mid,y_mid,x_len,y_len] is {will_return[0]}, {will_return[1]}, {will_return[2]}, {will_return[3]}')
    return will_return[0], will_return[1], will_return[2], will_return[3]