def _get_next(iter_f):
    """
    Get function than get next of iterable in each call
    :param iter_f: iterable to wrap in next function
    :return: function to get next of iterable
    """

    def f_next():
        try:
            return next(iter_f)
        except RuntimeError:
            return None
        except StopIteration:
            return None

    return f_next