def _extend_str(class_node, rvalue):
code = dedent(<EOL>"""<STR_LIT>"""<EOL>)<EOL>code = code.format(rvalue=rvalue)<EOL>fake = AstroidBuilder(MANAGER).string_build(code)["<STR_LIT>"]<EOL>for method in fake.mymethods():<EOL><INDENT>method.parent = class_node<EOL>method.lineno = None<EOL>method.col_offset = None<EOL>if "<STR_LIT>" in method.locals:<EOL><INDENT>method.locals["<STR_LIT>"] = [class_node]<EOL><DEDENT>class_node.locals[method.name] = [method]<EOL>method.parent = class_node<EOL><DEDENT>
function to extend builtin str/unicode class