def test_support(file_list, source_tag):
    events = {
        'MediaStarted': 0,
        'MediaEnded': 0,
        'MediaCompleted': 0,
        'MediaFailed': 0,
        'MediaQualityChange': 0,
        'MediaQualityChangeAuto': 0,
        'MediaQualityChangeProgramatically': 0,
        'MediaInitialBufferStart': 0,
        'MediaInitialBufferEnd': 0,
        'MediaBufferingStart': 0,
        'MediaBufferingEnd': 0,
        'MediaScrub': 0
    }

    custom_fields = {
        'x_useragent': 0,
        'x_tpmid': 0,
        'x_episode_title': 0,
        'x_program_title': 0,
        'x_producer': 0,
        'x_video_length': 0,
        'x_client_id': 0,
        'x_session_id': 0,
        'x_tracking_id': 0,
        'x_video_location': 0,
        'x_stream_size': 0,
        'x_flash_player': 0,
        'x_buffering_length': 0,
        'x_encoding_name': 0,
        'x_auto': 0,
        'x_bandwidth': 0,
        'x_after_seek': 0,
        'x_start_time': 0,
        'x_previous_quality': 0,
        'x_new_quality': 0
    }

    # Iterate over passed in files
    for filename in file_list:
        try:
            with open(filename, 'r') as f:
                print 'processing file...'

                # Read file line by line and aggregate all fields ecountered
                for line in f:
                    # Parse line into dict
                    fields = GoonHillyLog.parse_log_line(line)

                    # Skip line if event source tag is not what we are looking
                    # for
                    if fields.get('source_tag') != source_tag:
                        continue

                    # Iterate over all keys in the event
                    for key in fields.iterkeys():
                        # If the key is an event, increment counter for that
                        # event
                        if key == 'event_type' and fields.get(key) in events:
                            events[fields.get(key)] += 1

                        # If key is a custom field, increment counter for that
                        # field
                        elif key in custom_fields:
                            custom_fields[key] += 1
        except __HOLE__:
            # Catch error if passed in file does not exist
            pass

    print_results(events, custom_fields, source_tag)
dataset/ETHPy150Open pbs/agora-proc/tests/goonhilly_support.py/test_support