def encode_raw(item):
if isinstance(item, Atomic):<EOL><INDENT>if len(item) == <NUM_LIT:1> and item[<NUM_LIT:0>] < <NUM_LIT>:<EOL><INDENT>return item<EOL><DEDENT>payload = item<EOL>prefix_offset = <NUM_LIT>  <EOL><DEDENT>elif not isinstance(item, str) and isinstance(item, collections.Sequence):<EOL><INDENT>payload = b'<STR_LIT>'.join(encode_raw(x) for x in item)<EOL>prefix_offset = <NUM_LIT>  <EOL><DEDENT>else:<EOL><INDENT>msg = '<STR_LIT>'.format(type(item).__name__)<EOL>raise EncodingError(msg, item)<EOL><DEDENT>try:<EOL><INDENT>prefix = length_prefix(len(payload), prefix_offset)<EOL><DEDENT>except ValueError:<EOL><INDENT>raise EncodingError('<STR_LIT>', item)<EOL><DEDENT>return prefix + payload<EOL>
RLP encode (a nested sequence of) :class:`Atomic`s.