code: def is_invalid_params_py3(func, *args, **kwargs):
      
      signature = inspect.signature(func)
      parameters = signature.parameters
  
      unexpected = set(kwargs.keys()) - set(parameters.keys())
      if len(unexpected) > 0:
          return True
  
      params = [
          parameter for name, parameter in parameters.items()
          if name not in kwargs
      ]
      params_required = [
          param for param in params
          if param.default is param.empty
      ]
  
      return not (len(params_required) <= len(args) <= len(params))
docs: Use inspect.signature instead of inspect.getargspec or
      inspect.getfullargspec (based on inspect.signature itself) as it provides
      more information about function parameters.
  
      .. versionadded: 1.11.2