No it is not ok to turn the result into a parameter. The point of that API is to return bytes in Human Readable Form whatever that form happens to be. As @mtomwing said, you should just refactor the function so that you don't have to duplicate the code in your new function.