def _to_ascii(s):
    """ Converts given string to ascii ignoring non ascii.
    Args:
        s (text or binary):

    Returns:
        str:
    """
    if isinstance(s, str):
        ascii_ = s.encode('ascii', 'ignore')
    elif isinstance(s, bytes):
        ascii_ = s.decode('utf-8').encode('ascii', 'ignore')
    else:
        raise Exception('Unknown text type - {}'.format(type(s)))
    return ascii_
