def check_analysis_status_and_get_results_command():
    analysis_type = demisto.args().get('analysis_type', 'File')
    analysis_ids = argToList(demisto.args().get('analysis_id'))
    indicator_name = demisto.args().get('indicator_name')
    for analysis_id in analysis_ids:
        response = make_analysis_status_request(analysis_id, analysis_type)
        analysis_result = handle_analysis_result(response)
        if (analysis_result and (analysis_type == 'Endpoint')):
            enrich_dbot_and_display_endpoint_analysis_results(analysis_result, indicator_name)
        elif (analysis_result and (analysis_type == 'File')):
            enrich_dbot_and_display_file_analysis_results(analysis_result)
def check_analysis_status_and_get_results_command():
    analysis_type = demisto.args().get('analysis_type', 'File')
    analysis_ids = argToList(demisto.args().get('analysis_id'))
    indicator_name = demisto.args().get('indicator_name')
    for analysis_id in analysis_ids:
        response = make_analysis_status_request(analysis_id, analysis_type)
        analysis_result = handle_analysis_result(response)
        if (analysis_result and (analysis_type == 'Endpoint')):
            enrich_dbot_and_display_endpoint_analysis_results(analysis_result, indicator_name)
        elif (analysis_result and (analysis_type == 'File')):
            enrich_dbot_and_display_file_analysis_results(analysis_result)