module Tapioca::RBIFilesHelper

def has_duplicated_mixins?(shims_or_todos)

: (Array[RBI::Node] shims_or_todos) -> bool
def has_duplicated_mixins?(shims_or_todos)
  # Don't forget `shims_or_todos` is a list of nodes with the same qualified name, so if we find two mixins of the
  # same name, they _are_ about the same thing, like two `include(A)` or two `requires_ancestor(A)` so this is a
  # duplicate
  shims_or_todos.any? { |node| node.is_a?(RBI::Mixin) || node.is_a?(RBI::RequiresAncestor) }
end