code: def swagger_specs_cached(app):
      with app.test_request_context("/"):
          return api.__schema__
  
imports: import pytest
  from flask_restplus import fields, Api, Resource
  from flask_restplus.swagger import Swagger
label_desc: Use image node_id 2 for calling a global function with example usage: swagger_specs_cached(app) and returns: api