@classmethod<EOL><INDENT>def from_string(cls, string, version):<DEDENT>
header, payload = string.split("<STR_LIT:\n>",<NUM_LIT:1>)<EOL>if payload[<NUM_LIT:0>] == '<STR_LIT:\n>': <EOL><INDENT>payload = payload[<NUM_LIT:1>:]<EOL><DEDENT>if int(version) == <NUM_LIT:1>:<EOL><INDENT>arc_header_re = ARC1_HEADER_RE<EOL><DEDENT>elif int(version) == <NUM_LIT:2>:<EOL><INDENT>arc_header_re = ARC2_HEADER_RE<EOL><DEDENT>matches = arc_header_re.search(header)<EOL>headers = matches.groupdict()<EOL>arc_header = ARCHeader(**headers)<EOL>return cls(header = arc_header, payload = payload, version = version)<EOL>
Constructs an ARC record from a string and returns it.  

TODO: It might be best to merge this with the _read_arc_record
function rather than reimplement the functionality here.