'`size` is the number of inserts per commit and `retries` is the
number of times to retry a failed transaction (when inserting
concurrently for example). 0 is forever, 1 does not retry, 2 retries
once, etc.'

def __init__(self, db, size=None, retries=0):

    self.db = db
    self.queries = []
    self.start_time = time.time()
    self.count = 0
    self.commited_count = 0
    self.size = (config.NEO4J_BATCH_SIZE if (size is None) else size)
    self.retries = retries
