def split_dual_date(file_name):
    """
      Given a file name like A_2017-08-01_2017-09-01.csv.bz2
      or B_2017-08-01_2017-09-01.csv returns the from and until dates
      as a tuple
    """
    return (file_name.split("_")[-2], [sym.split(".") for sym in file_name.split("_")][-1][0])