code: def is_invalid_params(func, *args, **kwargs):
      
      # For builtin functions inspect.getargspec(funct) return error. If builtin
      # function generates TypeError, it is because of wrong parameters.
      if not inspect.isfunction(func):
          return True
  
      if sys.version_info >= (3, 3):
          return is_invalid_params_py3(func, *args, **kwargs)
      else:
          # NOTE: use Python2 method for Python 3.2 as well. Starting from Python
          # 3.3 it is recommended to use inspect.signature instead.
          # In Python 3.0 - 3.2 inspect.getfullargspec is preferred but these
          # versions are almost not supported. Users should consider upgrading.
          return is_invalid_params_py2(func, *args, **kwargs)
docs: Method:
          Validate pre-defined criteria, if any is True - function is invalid
          0. func should be callable
          1. kwargs should not have unexpected keywords
          2. remove kwargs.keys from func.parameters
          3. number of args should be <= remaining func.parameters
          4. number of args should be >= remaining func.parameters less default