def update_meta_info(fw, context):
    ' Update file information\n\n    '
    if (context['container_type'] == 'file'):
        if (context['parent_container_type'] == 'acquisition'):
            fw.set_acquisition_file_info(context['acquisition']['id'], context['file']['name'], context['file']['info'])
        elif (context['parent_container_type'] == 'project'):
            fw.set_project_file_info(context['project']['id'], context['file']['name'], context['file']['info'])
        elif (context['parent_container_type'] == 'session'):
            fw.set_session_file_info(context['session']['id'], context['file']['name'], context['file']['info'])
        else:
            logger.info(('Cannot determine file parent container type: ' + context['parent_container_type']))
    elif (context['container_type'] == 'project'):
        fw.replace_project_info(context['project']['id'], context['project']['info'])
    elif (context['container_type'] == 'session'):
        fw.replace_session_info(context['session']['id'], context['session']['info'])
    elif (context['container_type'] == 'acquisition'):
        fw.replace_acquisition_info(context['acquisition']['id'], context['acquisition']['info'])
    else:
        logger.info(('Cannot determine container type: ' + context['container_type']))
Update file information
def update_meta_info(fw, context):
    ' \n\n    '
    if (context['container_type'] == 'file'):
        if (context['parent_container_type'] == 'acquisition'):
            fw.set_acquisition_file_info(context['acquisition']['id'], context['file']['name'], context['file']['info'])
        elif (context['parent_container_type'] == 'project'):
            fw.set_project_file_info(context['project']['id'], context['file']['name'], context['file']['info'])
        elif (context['parent_container_type'] == 'session'):
            fw.set_session_file_info(context['session']['id'], context['file']['name'], context['file']['info'])
        else:
            logger.info(('Cannot determine file parent container type: ' + context['parent_container_type']))
    elif (context['container_type'] == 'project'):
        fw.replace_project_info(context['project']['id'], context['project']['info'])
    elif (context['container_type'] == 'session'):
        fw.replace_session_info(context['session']['id'], context['session']['info'])
    elif (context['container_type'] == 'acquisition'):
        fw.replace_acquisition_info(context['acquisition']['id'], context['acquisition']['info'])
    else:
        logger.info(('Cannot determine container type: ' + context['container_type']))