def isinstance(self, types):
if isinstance(self, types):<EOL><INDENT>return True<EOL><DEDENT>inner_field = getattr(self, '<STR_LIT>', None)<EOL>while inner_field:<EOL><INDENT>if isinstance(inner_field, types):<EOL><INDENT>return True<EOL><DEDENT>inner_field = getattr(inner_field, '<STR_LIT>', None)<EOL><DEDENT>return False<EOL>
Checks if the instance if one of the types provided or if any of the inner_field child is one of the types
provided, returns True if field or any inner_field is one of ths provided, False otherwise
:param types: Iterable of types to check inclusion of instance
:return: Boolean