def create_from_string(self, string, context=EMPTY_CONTEXT, *args, **kwargs):
if not PY2 and not isinstance(string, bytes):<EOL><INDENT>raise TypeError("<STR_LIT>")<EOL><DEDENT>io = StringIO(string)<EOL>instance = self.create_from_stream(io, context, *args, **kwargs)<EOL>io.close()<EOL>return instance<EOL>
Deserializes a new instance from a string.
This is a convenience method that creates a StringIO object and calls create_instance_from_stream().