def METHOD_NAME(ty, cause=None):
    if isinstance(ty, W.named_type):
        METHOD_NAME(ty.declared_type(), cause=cause)
    elif isinstance(ty, W.type_declaration):
        types.add(ty.name())
        causes[ty.name()].add(cause)
    elif isinstance(ty, W.aggregation_type):
        METHOD_NAME(ty.type_of_element(), cause=cause)
    elif isinstance(ty, W.entity):
        visit_entity(ty, cause=cause)
    elif isinstance(ty, W.enumeration_type):
        types.add(ty.name())
        causes[ty.name()].add(cause)
    elif isinstance(ty, W.simple_type):
        pass
    elif isinstance(ty, W.select_type):
        # @nb this is important, select types do *not* result
        # in broadening the mvd scope. Templates need explicitly
        # incorporate selected subtypes for them to be in scope.
        # causes[ty.name()].add(cause)
        # for dd in ty.select_list():
        #     visit_typedecl(dd, cause=ty.name())
        pass
    else:
        breakpoint()