def METHOD_NAME(sink):
    nonlocal hasFinished
    sample = sink.emit('pull-sample')
    if hasFinished:
        return Gst.FlowReturn.OK
    asyncio.run_coroutine_threadsafe(sampleQueue.put(sample), loop = loop)
    try:
        yieldQueue.get()
    except:
        pass
    return Gst.FlowReturn.OK