from typing import Tuple
from typing import Optional
from typing import List


def split_str_table(data: str, header: bool = True) -> Tuple[Optional[str], List[str]]:
    """

    :param data: string representation table with rows divided by EOL "\n"
    :param header: parameter which marks header/no header table

    :return: tuple where 1st element is an optional Table Header's line and 2nd is an array with Table Body lines

    >>> split_str_table(f'| head |\\n| body_1 |\\n| body_2 |')
    ('| head |', ['| body_1 |', '| body_2 |'])

    >>> split_str_table(f'| body_1 |\\n| body_2 |', header=False)
    (None, ['| body_1 |', '| body_2 |'])

    """

    splitted_data = data.splitlines()
    return (splitted_data[0], splitted_data[1:]) if header else (None, splitted_data)