def validate_resampler_func(method, args, kwargs):
 if ((len(args) + len(kwargs)) > 0):
  if (method in RESAMPLER_NUMPY_OPS):
   raise UnsupportedFunctionCall('numpy operations are not valid with resample. Use .resample(...).{func}() instead'.format(func=method))
  else:
   raise TypeError('too many arguments passed in')

def validate_resampler_func ( method , args , kwargs ) : if ( ( len ( args ) + len ( kwargs ) ) > 0 ) : if ( method in RESAMPLER_NUMPY_OPS ) : raise UnsupportedFunctionCall ( 'numpy operations are not valid with resample. Use .resample(...).{func}() instead' . format ( func = method ) ) else : raise TypeError ( 'too many arguments passed in' )
args and kwargs should be empty because all of their necessary parameters are explicitly listed in the function signature .