(data_dict, back_or_front)
Adds spct if relevant, adds service
Adds spct if relevant, adds service
Adds spct if relevant adds service
def _update_data_dict(data_dict, back_or_front):
        """
        Adds spct if relevant, adds service
        """
        data_dict['back_or_front'] = back_or_front
        # The percentage of used sessions based on 'scur' and 'slim'
        if 'slim' in data_dict and 'scur' in data_dict:
            try:
                data_dict['spct'] = (data_dict['scur'] / data_dict['slim']) * 100
            except (TypeError, ZeroDivisionError):
                pass
def _update_data_dict ( data_dict , back_or_front ) : data_dict [ 'back_or_front' ] = back_or_front # The percentage of used sessions based on 'scur' and 'slim' if 'slim' in data_dict and 'scur' in data_dict : try : data_dict [ 'spct' ] = ( data_dict [ 'scur' ] / data_dict [ 'slim' ] ) * 100 except ( TypeError , ZeroDivisionError ) : pass