def _get_leaf(node):
    """
    Gets innermost definition of Typedef or Struct-/UnionMember.
    Other nodes pass through.
    """
    while getattr(node, 'definition', None):
        node = node.definition
    return node