<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def keep_indels(mut_df, indel_len_col=True, indel_type_col=True):
 """Filters out all mutations that are not indels. Requires that one of the alleles have '-' indicating either an insertion or deletion depending if found in reference allele or somatic allele columns, respectively. Parameters mut_df : pd.DataFrame mutation input file as a dataframe in standard format indel_len_col : bool whether or not to add a column indicating the length of the indel Returns ------- mut_df : pd.DataFrame mutations with only frameshift mutations kept """

    # keep only frameshifts
    mut_df = mut_df[is_indel_annotation(mut_df)]

    if indel_len_col:
        # calculate length
        mut_df.loc[:, 'indel len'] = compute_indel_length(mut_df)

    if indel_type_col:
        is_ins = mut_df['Reference_Allele']=='-'
        is_del = mut_df['Tumor_Allele']=='-'
        mut_df['indel type'] = ''
        mut_df.loc[is_ins, 'indel type'] = 'INS'
        mut_df.loc[is_del, 'indel type'] = 'DEL'

    return mut_df