def METHOD_NAME(file, state):
    decoded_file = file if type(file) == str else file.decode('utf-8')
    data = json.loads(decoded_file)
    if 'character_menu' in data and state.get('character_menu') != data.get('character_menu'):
        shared.session_is_loading = True
    state.update(data)
    return state