code: def _endReq(self, key, result=None, success=True):
          
          future = self._futures.pop(key, None)
          self._reqId2Contract.pop(key, None)
          if future:
              if result is None:
                  result = self._results.pop(key, [])
              if not future.done():
                  if success:
                      future.set_result(result)
                  else:
                      future.set_exception(result)
docs: Finish the future of corresponding key with the given result.
          If no result is given then it will be popped of the general results.