def _recur_strip(s):
    if is_str(s):
        if (bos_token == ''):
            return ' '.join(s.strip().split())
        else:
            return ' '.join(s.strip().split()).replace((bos_token + ' '), '')
    else:
        s_ = [_recur_strip(si) for si in s]
        return _maybe_list_to_array(s_, s)
def _recur_strip(s):
    if is_str(s):
        if (bos_token == ):
            return ' '.join(s.strip().split())
        else:
            return ' '.join(s.strip().split()).replace((bos_token + ' '), )
    else:
        s_ = [_recur_strip(si) for si in s]
        return _maybe_list_to_array(s_, s)