@contextmanager
def emitting(exit, enter=None):
    if enter is not None:
        emit(enter)

    try:
        yield
    finally:
        emit(exit)
Calculates hashes of the contents of a file.
dataset/ETHPy150Open shaunduncan/smokesignal/smokesignal.py/emitting--crossover with--dataset/ETHPy150Open GoogleCloudPlatform/gsutil/gslib/hashing_helper.py/CalculateHashesFromContents