code: def _check_type(var, vtype):
      """
      Return True if the variable is of the specified type, and False otherwise.
  
      :param var: variable to check
      :param vtype: expected variable's type
      """
      if vtype is None:
          return var is None
      if isinstance(vtype, _primitive_type):
          return var == vtype
      if vtype is str:
          return isinstance(var, _str_type)
      if vtype is int:
          return isinstance(var, _int_type)
      if vtype is numeric:
          return isinstance(var, _num_type)
      if isinstance(vtype, MagicType):
          return vtype.check(var)
      if isinstance(vtype, type):
          # ``vtype`` is a name of the class, or a built-in type such as "list", "tuple", etc
          return isinstance(var, vtype)
      if isinstance(vtype, list):
          # ``vtype`` is a list literal
          elem_type = U(*vtype)
          return isinstance(var, list) and all(
              _check_type(item, elem_type) for item in var
          )
      if isinstance(vtype, set):
          # ``vtype`` is a set literal
          elem_type = U(*vtype)
          return isinstance(var, set) and all(
              _check_type(item, elem_type) for item in var
          )
      if isinstance(vtype, tuple):
          # ``vtype`` is a tuple literal
          return (
              isinstance(var, tuple)
              and len(vtype) == len(var)
              and all(
                  _check_type(var[i], vtype[i])
                  for i in range(len(vtype))
              )
          )
      if isinstance(vtype, dict):
          # ``vtype`` is a dict literal
          ttkv = U(*(vtype.items()))
          return isinstance(var, dict) and all(
              _check_type(kv, ttkv) for kv in var.items()
          )
      if isinstance(vtype, (FunctionType, BuiltinFunctionType)):
          return vtype(var)
      raise RuntimeError("Ivalid type %r in _check_type()" % vtype)
  
imports: from h2o.utils.compatibility import *
  import importlib
  import io
  import re
  import sys
  import tokenize
  from types import BuiltinFunctionType, FunctionType
  from h2o.exceptions import H2OTypeError, H2OValueError
label_desc: Use image node_id 7 for calling a global function with example usage: _check_type(var, vtype) and returns: unknown, unknown, isinstance, isinstance, isinstance, vtype, isinstance, unknown, unknown, unknown, unknown, vtype