code: def is_valid_method_view(endpoint):
      
      klass = endpoint.__dict__.get('view_class', None)
      try:
          return issubclass(klass, MethodView)
      except TypeError:
          return False
docs: Return True if obj is MethodView