use inspect.getcallargs instead of shadow lambda

possibly `is_valid_call`