def provide_deliveries(slogAccess, blockHeight, run, blockrun):
    br = blockrun[((blockrun.run == run.name) & (blockrun.blockHeight == blockHeight))]
    if (len(br) < 2):
        return no_deliveries.assign(file_id=(- 1), chain=(- 1), blockHeight=blockHeight, run=run.name)
    block_start = br.iloc[0]
    block_end = br.iloc[1]
    length = int(((block_end.line - block_start.line) + 1))
    df = slogAccess.provide_data(run.parent, run['name'], int(block_start.line), length, f'deliveries-{blockHeight}', no_deliveries, (lambda ref, start, qty: get_deliveries(slogAccess, ref, start, qty)), 'gzip')
    df = df.assign(chain=run.chain, blockHeight=blockHeight, run=run.name)
    if ((df.dtypes['chain'] not in ['int64', 'float64']) or ('vatID' not in df.columns) or ('vd' in df.columns)):
        raise NotImplementedError(f'''cols: {df.columns} dtypes: {df.dtypes} block {(blockHeight, int(block_start.line))}, run
{run}''')
    return df
def provide_deliveries(slogAccess, blockHeight, run, blockrun):
    br = blockrun[((blockrun.run == run.name) & (blockrun.blockHeight == blockHeight))]
    if (len(br) < 2):
        return no_deliveries.assign(file_id=(- 1), chain=(- 1), blockHeight=blockHeight, run=run.name)
    block_start = br.iloc[0]
    block_end = br.iloc[1]
    length = int(((block_end.line - block_start.line) + 1))
    df = slogAccess.provide_data(run.parent, run['name'], int(block_start.line), length, f'deliveries-{blockHeight}', no_deliveries, (lambda ref, start, qty: get_deliveries(slogAccess, ref, start, qty)), 'gzip')
    df = df.assign(chain=run.chain, blockHeight=blockHeight, run=run.name)
    if ((df.dtypes['chain'] not in ['int64', 'float64']) or ('vatID' not in df.columns) or ('vd' in df.columns)):
        raise NotImplementedError(f'cols: {df.columns} dtypes: {df.dtypes} block {(blockHeight, int(block_start.line))}, run
{run}')
    return df