code: def encode_raw(item):
      
      if isinstance(item, Atomic):
          if len(item) == 1 and item[0] < 128:
              return item
          payload = item
          prefix_offset = 128  # string
      elif not isinstance(item, str) and isinstance(item, collections.Sequence):
          payload = b''.join(encode_raw(x) for x in item)
          prefix_offset = 192  # list
      else:
          msg = 'Cannot encode object of type {0}'.format(type(item).__name__)
          raise EncodingError(msg, item)
  
      try:
          prefix = length_prefix(len(payload), prefix_offset)
      except ValueError:
          raise EncodingError('Item too big to encode', item)
  
      return prefix + payload
docs: RLP encode (a nested sequence of) :class:`Atomic`s.