code: def test_method_based_view(app):
      class Index(flask.views.MethodView):
          def get(self):
              return "GET"
  
          def post(self):
              return "POST"
  
      app.add_url_rule("/", view_func=Index.as_view("index"))
  
      common_test(app)
  
file_path: flask/tests/test_views.py
imports: import pytest
  from werkzeug.http import parse_set_header
  import flask.views
label_desc: Use image node_id 3 for calling a global function with example usage: test_method_based_view(app) and returns: str, str