def __instancecheck__(self, instance):
result = isinstance(instance, Iterable) and not isinstance(<EOL>instance, string_types<EOL>)<EOL>if result:<EOL><INDENT>for item in instance:<EOL><INDENT>result = isinstance(item, self.ptype)<EOL>if not result:<EOL><INDENT>raise ParserError(<EOL>'<STR_LIT>'.format(<EOL>item, type(item), instance, self.ptype<EOL>)<EOL>)<EOL>break<EOL><DEDENT><DEDENT><DEDENT>return result<EOL>
Check instance such as this instance or self ptype instance.