code: def _check_schema_version(
      version, es, warning_text, caplog, warning_type=None
  ):
      dataframes = {
          dataframe.ww.name: typing_info_to_dict(dataframe)
          for dataframe in es.dataframes
      }
      relationships = [
          relationship.to_dictionary()
          for relationship in es.relationships
      ]
      dictionary = {
          "schema_version": version,
          "id": es.id,
          "dataframes": dataframes,
          "relationships": relationships,
          "data_type": es.dataframe_type,
      }
  
      if warning_type == "warn" and warning_text:
          with pytest.warns(UserWarning) as record:
              deserialize.description_to_entityset(dictionary)
          assert record[0].message.args[0] == warning_text
      elif warning_type == "log":
          logger = logging.getLogger("featuretools")
          logger.propagate = True
          deserialize.description_to_entityset(dictionary)
          if warning_text:
              assert warning_text in caplog.text
          else:
              assert not len(caplog.text)
          logger.propagate = False
  
imports: import json
  import logging
  import os
  import tempfile
  from unittest.mock import patch
  from urllib.request import urlretrieve
  import boto3
  import pandas
  import pytest
  import woodwork.type_sys.type_system
  from woodwork.logical_types import Datetime, LogicalType, Ordinal
  from woodwork.serializers.serializer_base import typing_info_to_dict
  from woodwork.type_sys.utils import list_logical_types
  from featuretools.entityset import EntitySet, deserialize, serialize
  from featuretools.tests.testing_utils import to_pandas
  from featuretools.utils.gen_utils import Library
  from featuretools.version import ENTITYSET_SCHEMA_VERSION
label_desc: Use image node_id 35 for calling a global function with example usage: _check_schema_version(version, es, warning_text, caplog, warning_type) without return types