code: def raw_writer(indent=None):
      
  
      is_whitespace_str = isinstance(indent, str) and re.search(r'\A\s*\Z', indent, re.M) is not None
      if not (indent is None or is_whitespace_str):
          raise ValueError('The indent parameter must either be None or a string containing only whitespace')
  
      indent_bytes = six.b(indent) if isinstance(indent, str) else indent
  
      return writer_trampoline(_raw_writer_coroutine(indent=indent_bytes))
docs: Returns a raw text writer co-routine.
  
      Yields:
          DataEvent: serialization events to write out
  
          Receives :class:`amazon.ion.core.IonEvent` or ``None`` when the co-routine yields
          ``HAS_PENDING`` :class:`WriteEventType` events.