docs: def mapred(self, inputs, query, timeout=None):
          """
          Run a MapReduce query.
          """
          # Construct the job, optionally set the timeout...
          content = self._construct_mapred_json(inputs, query, timeout)
  
          # Do the request...
          url = self.mapred_path()
          headers = {'Content-Type': 'application/json'}
          status, headers, body = self._request('POST', url, headers, content)
  
          # Make sure the expected status code came back...
          if status != 200:
              raise RiakError(
                  'Error running MapReduce operation. Headers: %s Body: %s' %
                  (repr(headers), repr(body)))
  
          result = json.loads(bytes_to_str(body))
          return result