docs: def stream_mapred(self, inputs, query, timeout):
          """
          Streams a MapReduce query as (phase, data) pairs. This is a
          generator method which should be iterated over.
  
          The caller should explicitly close the returned iterator,
          either using :func:`contextlib.closing` or calling ``close()``
          explicitly. Consuming the entire iterator will also close the
          stream. If it does not, the associated connection might
          not be returned to the pool. Example::
  
              from contextlib import closing
  
              # Using contextlib.closing
              with closing(mymapred.stream()) as results:
                  for phase, result in results:
                      do_something(phase, result)
  
              # Explicit close()
              stream = mymapred.stream()
              for phase, result in stream:
                   do_something(phase, result)
              stream.close()
  
          :param inputs: the input list/structure
          :type inputs: list, dict
          :param query: the list of query phases
          :type query: list
          :param timeout: the query timeout
          :type timeout: integer, None
          :rtype: iterator
          """
          _validate_timeout(timeout)
  
          def make_op(transport):
              return transport.stream_mapred(inputs, query, timeout)
  
          for phase, data in self._stream_with_retry(make_op):
              yield phase, data