parameters: (a, b)
return_statement: return type(a)(**merged)
docstring: Compute the disjunction of two trees with None or int leaves.
docstring_summary: Compute the disjunction of two trees with None or int leaves.
docstring_tokens: Compute the disjunction of two trees with None or int leaves .
function: def _tree_union(a, b):
    """Compute the disjunction of two trees with None or int leaves."""
    if a is None or isinstance(a, int):
      return a
  
    if _is_named_tuple(a):
      return type(a)(**_tree_union(a._asdict(), b._asdict()))
    if isinstance(a, (List, Tuple)):
      return type(a)(
          _tree_union(aa, bb) for aa, bb in itertools.zip_longest(a, b))
  
    merged = {**a}
  
    for k, v in b.items():
      if k in a:
        merged[k] = _tree_union(a[k], v)
      else:
        merged[k] = v
  
    return type(a)(**merged)
function_tokens: def _tree_union ( a , b ) : if a is None or isinstance ( a , int ) : return a if _is_named_tuple ( a ) : return type ( a ) ( * * _tree_union ( a . _asdict ( ) , b . _asdict ( ) ) ) if isinstance ( a , ( List , Tuple ) ) : return type ( a ) ( _tree_union ( aa , bb ) for aa , bb in itertools . zip_longest ( a , b ) ) merged = { * * a } for k , v in b . items ( ) : if k in a : merged [ k ] = _tree_union ( a [ k ] , v ) else : merged [ k ] = v return type ( a ) ( * * merged )