def yield_task(self, fn, *args, **kwargs):

    ioloop = IOLoop.current()
    future = Future()
    def call():
      result = None
      error = None
      try:
        result = fn(*args, **kwargs)
      except Exception as e:
        ioloop.add_callback(future.set_exc_info, exc_info())
      else:
        # tornado future is not threadsafe
        ioloop.add_callback(future.set_result, result)
    self.add_task(call)
    return future
Uploads a file to a given Cloud Storage bucket and returns the public url
dataset/ETHPy150Open JeremyOT/Toto/toto/tasks.py/TaskQueue.yield_task--crossover with--dataset/ETHPy150Open GoogleCloudPlatform/getting-started-python/3-binary-data/bookshelf/storage.py/upload_file