from typing import Tuple
from typing import Union


def get_last_int_of_line(line: str) -> Tuple[str, Union[None, int]]:
    """ Searches an integer in the line

    Parameters
    ----------
    line: str
        line to be searched

    Returns
    -------
    rest_line: str
        rest of line before match
    number: Union[int, None]
        number or None if not found
    """
    for entry in line.split():
        if entry.isdigit():
            return line[:line.rfind(entry)], int(entry)
    return line, None