code: def is_model_view_subclass_method_shouldnt_be_function(node):
      
      if node.name not in ('get', 'post'):
          return False
  
      parent = node.parent
      while parent and not isinstance(parent, ScopedClass):
          parent = parent.parent
  
      subclass = ('django.views.View',
                  'django.views.generic.View',
                  'django.views.generic.base.View',)
  
      return parent is not None and node_is_subclass(parent, *subclass)
docs: Checks that node is get or post method of the View class.