'Creates a generator to extract data from the queue.
Skip the data if it is `None`.
# Returns
Generator yielding tuples (inputs, targets)
or (inputs, targets, sample_weights)'

def get(self):

    try:
        while self.is_running():
            inputs = self.queue.get(block=True).get()
            if (inputs is not None):
                (yield inputs)
    except Exception as e:
        self.stop()
        raise StopIteration(e)
