def METHOD_NAME(
        value_or_value_wrapper: ValueOrValueWrapper,
        input_visitor: Callable[[Type], Any],
        output_visitor: Callable[[Type], Any],
        **kwargs):
    pre_descend = kwargs.get("pre_descend", lambda _: None)
    post_descend = kwargs.get("post_descend", lambda _: None)
    inout_visitor = kwargs.get("inout_visitor", None)
    def descend(v):
        if not isinstance(v, (m_Tuple, Array)):
            raise TypeError(v)
        pre_descend(v)
        for item in v:
            METHOD_NAME(
                item, input_visitor, output_visitor, **kwargs)
        post_descend(v)
    flatten_all_tuples = kwargs.get("flatten_all_tuples", False)
    if flatten_all_tuples and contains_tuple(type(value_or_value_wrapper)):
        return descend(value_or_value_wrapper)
    if value_or_value_wrapper.is_input():
        return input_visitor(value_or_value_wrapper)
    if value_or_value_wrapper.is_output():
        return output_visitor(value_or_value_wrapper)
    if value_or_value_wrapper.is_mixed():
        return descend(value_or_value_wrapper)
    if inout_visitor is not None:
        return inout_visitor(value_or_value_wrapper)
    raise TypeError(value_or_value_wrapper)