code: def assert_response_expectations(
      response: requests.Response, expectations: Dict[str, Any]
  ):
      content_type = expectations["content_type"]
  
      expected = expectations.get("expected")
      if expected:
          output = _get_response_content(response, content_type)
          assert (
              output == expected
          ), f"unexpected response: got {output}, expected {expected}"
  
      expected_json_schema = expectations.get("json_schema")
      if expected_json_schema:
          output = _get_response_content(response, content_type)
          jsonschema.validate(output, schema=expected_json_schema)
  
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 1 for calling a global function with example usage: assert_response_expectations(response, expectations) without return types