code: def instance_of(type):
      """
      A validator that raises a `TypeError` if the initializer is called
      with a wrong type for this particular attribute (checks are performed using
      `isinstance` therefore it's also valid to pass a tuple of types).
  
      :param type: The type to check for.
      :type type: type or tuple of types
  
      :raises TypeError: With a human readable error message, the attribute
          (of type `attr.Attribute`), the expected type, and the value it
          got.
      """
      return _InstanceOfValidator(type)
  
imports: from __future__ import absolute_import, division, print_function
  import re
  from ._make import _AndValidator, and_, attrib, attrs
  from .exceptions import NotCallableError
label_desc: Use image node_id 1 for calling a global function with example usage: instance_of(type) and returns: _InstanceOfValidator