def build_share2handleindex_dict(file_handles: list) -> dict:
    """ given list of open file handles, create a dictionary relating share_num part to index within file_handles list"""

    dict_out = {}
    for i, fh in enumerate(file_handles):
        name = fh.name  # ='C:\BsbEtl\OUT\By_Share\120470.ETR\120470.ETR.CSV'
        share_part = name[-14:-8]  # 120470 # NOTE bourse part .ETR is stripped as the key
        dict_out[share_part] = i

    return dict_out