python create function with optional parameters