Change return type in docstring from str to bytes