code: def _check_generic(cls, parameters):
      if not cls.__parameters__:
          raise TypeError("%s is not a generic class" % repr(cls))
      alen = len(parameters)
      elen = len(cls.__parameters__)
      if alen != elen:
          raise TypeError(
              "Too %s parameters for %s; actual %s, expected %s"
              % (
                  "many" if alen > elen else "few",
                  repr(cls),
                  alen,
                  elen,
              )
          )
  
imports: import abc
  import collections
  import contextlib
  import sys
  import typing
  import collections.abc
  import operator
  from typing import Generic, Callable, TypeVar, Tuple
label_desc: Use image node_id 2 for calling a global function with example usage: _check_generic(cls, parameters) without return types