from typing import Tuple


def pair_get_asset_ids(pair: str) -> Tuple[str, str]:
    """Split a pair into asset ids.
    Not using the functions in the code as they may go away and return assets

    If a pair can't be split it raises a ValueError.
    """
    assets = pair.split('_')
    if len(assets) != 2:
        raise ValueError(f'could not split pair {pair}')

    if len(assets[0]) == 0 or len(assets[1]) == 0:
        raise ValueError(f'could not split {pair}. It is missing either base or quote asset')

    return assets[0], assets[1]