def _valid_for_check(cls):
 if (cls is Generic):
  raise TypeError((u'Class %r cannot be used with class or instance checks' % cls))
 if ((cls.__origin__ is not None) and (sys._getframe(3).f_globals[u'__name__'] not in [u'abc', u'functools'])):
  raise TypeError(u'Parameterized generics cannot be used with class or instance checks')

def _valid_for_check ( cls ) : if ( cls is Generic ) : raise TypeError ( ( u'Class %r cannot be used with class or instance checks' % cls ) ) if ( ( cls . __origin__ is not None ) and ( sys . _getframe ( 3 ) . f_globals [ u'__name__' ] not in [ u'abc' , u'functools' ] ) ) : raise TypeError ( u'Parameterized generics cannot be used with class or instance checks' )
an internal helper to prohibit isinstance etc .