code: def _get_response_content(
      response: requests.Response, content_type: str
  ) -> str:
      attr = CONTENT_TO_ATTR.get(content_type, "content")
      content = getattr(response, attr)
      if isinstance(content, types.MethodType):
          return content()
  
      return content
  
file_path: cortex/test/e2e/e2e/expectations.py
imports: import pathlib
  import types
  from typing import Dict, Any
  import jsonschema
  import requests
  import yaml
  from jsonschema import Draft7Validator
  from e2e.exceptions import ExpectationsValidationException
label_desc: Use image node_id 6 for calling a global function with example usage: _get_response_content(response, content_type) and returns: content, content