def _handle_save_freq_options(save_freq, total_steps=300):
    """Handle multiple string options for save_freq (see docs for fdg_plus_images)
       total_steps is the number of time steps d3 seems to takes in the sim (always 300?)
       Returns:
       save_freq: JS-friendly format (integer or 'null')
       ignore_first: boolean flag that controls which svgs get processed to images"""
    ignore_first = save_freq == 'last'
    sf_dict = {None: 'null', 'first_last': total_steps - 1, 'last': 
        total_steps - 1, 'first': 10000000, 'all': 1, (-1): total_steps - 1}
    save_freq = sf_dict[save_freq] if save_freq in sf_dict else save_freq
    return save_freq, ignore_first
