def get_iterator(num_chunks, verbose):
    """utility function to add a progress bar if verbosity is set to True."""
    if verbose:
        from tqdm import tqdm
        iterator = tqdm(range(num_chunks), desc='building dict')
    else:
        iterator = range(num_chunks)
    return iterator
