def _get_digits(text: str) -> int:
    """Gets digits from text.

    Args:
        text (str): text

    Returns:
        int: digits from text
    """
    s = ""
    for x in text:
        if x.isdigit():
            s += x

        else:
            pass
    if s:
        i = int(s)
    else:
        i = 0

    return i