The replace_function_signature function currently has a cyclomatic complexity of 17 and should be 10 or under.