code: def check_type(destination_cls, field, name, value):
      if field.type and not any(
          isinstance(value, get_type(t)) for t in field.type
      ):
          actual_type = type(value)
          message = "Invalid type for field {0}.{1}, was {2}".format(
              destination_cls.__name__, name, actual_type.__name__
          )
          raise PTypeError(
              destination_cls, name, field.type, actual_type, message
          )
  
imports: import six
  import sys
  from pyrsistent._checked_types import CheckedPMap, CheckedPSet, CheckedPVector, CheckedType, InvariantException, _restore_pickle, get_type, maybe_parse_user_type, maybe_parse_many_user_types
  from pyrsistent._checked_types import optional
  from pyrsistent._checked_types import wrap_invariant
  import inspect
label_desc: Use image node_id 4 for calling a global function with example usage: check_type(destination_cls, field, name, value) without return types