code: def _check_generic(cls, parameters):
      if not cls.__parameters__:
          raise TypeError(f"{cls} is not a generic class")
      alen = len(parameters)
      elen = len(cls.__parameters__)
      if alen != elen:
          raise TypeError(
              f"Too {'many' if alen > elen else 'few'} arguments for {cls};"
              f" actual {alen}, expected {elen}"
          )
  
file_path: catboost/contrib/python/setuptools/py3/setuptools/_vendor/typing_extensions.py
imports: import abc
  import collections
  import collections.abc
  import operator
  import sys
  import typing
label_desc: Use image node_id 2 for calling a global function with example usage: _check_generic(cls, parameters) without return types