def sim(df, c_eg, dur_eg, target):
    df = df[(df.chain == 16)]
    df['running'] = df.compute.cumsum()
    threshold = (target * (c_eg / dur_eg))
    log.info('threshold: %s', threshold)
    df['sim_blk'] = (df.running / threshold).round()
    return df.reset_index(drop=True)
def sim(df, c_eg, dur_eg, target):
    df = df[(df.chain == 16)]
    df['running'] = df.compute.cumsum()
    threshold = (target * (c_eg / dur_eg))
    log.info('threshold: %s', threshold)
    df['sim_blk'] = (df.running / threshold).round()
    return df.reset_index(drop=True)