  from rest_framework.reverse import reverse
  
  
  def _is_extra_action(attr):
      return hasattr(attr, 'mapping')
  
  
  class ViewSetMixin:
      """
      This is the magic.
 
</s>
    return hasattr(attr, 'mapping') and isinstance(attr.mapping, MethodMapper)
  from rest_framework.reverse import reverse
  
  
  def _is_extra_action(attr):
    return hasattr(attr, 'mapping') and isinstance(attr.mapping, MethodMapper)
  
  
  class ViewSetMixin:
      """
      This is the magic.
keep keep keep keep replace keep keep keep keep keep
 Extra action detection is too permissive. Add failing test + fix (#7217)

* Add failing test

* Add failing test++

* Make get_extra_action less permissive
rest_framework/viewsets.py