def sort_bins(dr_info, dr_names):
    """
    This function sorts/reformats the input dr_info dataframe (a single entry of the
    dr_product_info dictionary that is input into calc_yearly_emissions) into a dictionary
    with keys for each bin number (e.g. "Bin 1") and entries of the list of DR products
    that correspond to that bin number.

    Args:
        dr_info: DR product information dataframe for a given DR plan
        dr_names: list of DR products (str) for a given DR plan, season

    Returns:
        out_dict: dictionary with bin number as keys and DR product names
                  as values, for a given DR plan and season.
    """
    out_dict = {}

    for dr_name in dr_names:
        bin_name = dr_info.Bin.loc[dr_info.Product == dr_name].values[0]
        if bin_name in list(out_dict.keys()):
            out_dict[bin_name] = out_dict[bin_name]+[dr_name]
        else:
            out_dict[bin_name] = [dr_name]

    return out_dict