code: def _build_type_validator(value_type):
      
  
      def type_validator(data):
          """Validate instances of a particular type."""
          if isinstance(data, value_type):
              return data
  
          raise NotValid('%r is not of type %r' % (data, value_type))
  
      return type_validator
docs: Build a validator that only checks the type of a value.