def wrap_row(r:list, by:int = 1) -> list:
    """Wraps the list r by number of positions.
    
    Positive by will shift right.
    Negative shifts left.

    Args:
        r (list): list to wrap.
        by (int, optional): number of positions to shift by. Defaults to 1.

    Returns:
        list: wrapped list.
    """    
    return r[-by:] + r[:-by]