parameters: (shallow_tree, input_tree)
docstring: Yields elements `input_tree` partially flattened up to `shallow_tree`.
docstring_summary: Yields elements `input_tree` partially flattened up to `shallow_tree`.
docstring_tokens: Yields elements input_tree partially flattened up to shallow_tree .
function: def _yield_flat_up_to(shallow_tree, input_tree):
    """Yields elements `input_tree` partially flattened up to `shallow_tree`."""
    if is_sequence(shallow_tree):
      for shallow_branch, input_branch in zip(_yield_value(shallow_tree),
                                              _yield_value(input_tree)):
        for input_leaf in _yield_flat_up_to(shallow_branch, input_branch):
          yield input_leaf
    else:
      yield input_tree
function_tokens: def _yield_flat_up_to ( shallow_tree , input_tree ) : if is_sequence ( shallow_tree ) : for shallow_branch , input_branch in zip ( _yield_value ( shallow_tree ) , _yield_value ( input_tree ) ) : for input_leaf in _yield_flat_up_to ( shallow_branch , input_branch ) : yield input_leaf else : yield input_tree