code: def _handle_stream_line(line):
      
      # XXX This necessary processing is probably a bug from docker-py,
      # hence, might break if the bug is fixed, i.e. we should get decoded JSON
      # directly from the API.
      line = json.loads(line)
      if 'error' in line:
          content = "ERROR: " + line['error']
      else:
          content = line.get('stream', '')
      for streamline in content.split('\n'):
          if streamline:
              yield streamline
docs: \
      Input is the json representation of: {'stream': "Content\ncontent"}
      Output is a generator yield "Content", and then "content"