try:
    test_func(*args, **kwargs)
except TypeError:
    return False
else:
    return True

def x(a, b, c):
    pass

def y(a, b=1, c=2):
    pass

def z(a=1, b=2, c=3):
    pass
print(valid(x, ('hello', 'goodbye', 'what?'), {}))
print(valid(x, ('hello', 'goodbye'), {}))
print(valid(y, ('hello', 'goodbye', 'what?'), {}))
print(valid(y, (), {'a': 'hello', 'b': 'goodbye', 'c': 'what'}))
print(valid(y, ('hello', 'goodbye'), {'c': 'what?'}))
check for valid arguments