def METHOD_NAME(folder, file_list, filetype, tags_to_apply,
                       get_configuration, configure_environment,
                       restart_syscheckd, wait_for_fim_start):
    '''
    description: Check if the 'wazuh-syscheckd' daemon detects 'deleted' events from the files contained
                 in a folder that is being deleted. For example, the folder '/testdir' is monitored, and
                 the files 'r1', 'r2' and 'r3' are inside '/testdir'. If '/testdir' is deleted, three
                 events of type 'deleted' must be generated, one for each of the regular files.
                 For this purpose, the test will monitor a folder using the 'scheduled' monitoring mode,
                 create the testing files inside it, and change the system time until the next
                 scheduled scan. Then, remove the monitored folder, and finally, the test
                 verifies that the 'deleted' events have been generated.
    wazuh_min_version: 4.2.0
    tier: 0
    parameters:
        - folder:
            type: str
            brief: Path to the monitored testing directory.
        - file_list:
            type: list
            brief: Used names for the testing files.
        - filetype:
            type: str
            brief: Type of the testing file.
        - tags_to_apply:
            type: set
            brief: Run test if match with a configuration identifier, skip otherwise.
        - get_configuration:
            type: fixture
            brief: Get configurations from the module.
        - configure_environment:
            type: fixture
            brief: Configure a custom environment for testing.
        - restart_syscheckd:
            type: fixture
            brief: Clear the 'ossec.log' file and start a new monitor.
        - wait_for_fim_start:
            type: fixture
            brief: Wait for realtime start, whodata start, or end of initial FIM scan.
    assertions:
        - Verify that when a monitored folder is deleted, the files inside it
          generate FIM events of the type 'deleted'.
    input_description: A test case (ossec_conf) is contained in external YAML file (wazuh_conf.yaml)
                       which includes configuration settings for the 'wazuh-syscheckd' daemon and, it
                       is combined with the testing directories to be monitored defined in this module.
    expected_output:
        - r'.*Sending FIM event: (.+)$'
    tags:
        - scheduled
        - time_travel
    '''
    check_apply_test(tags_to_apply, get_configuration['tags'])
    scheduled = get_configuration['metadata']['fim_mode'] == 'scheduled'
    mode = get_configuration['metadata']['fim_mode']
    # Create files inside subdir folder
    for file in file_list:
        create_file(filetype, folder, file, content='')
    check_time_travel(scheduled, monitor=wazuh_log_monitor)
    events = wazuh_log_monitor.start(timeout=global_parameters.default_timeout, callback=callback_detect_event,
                                     accum_results=len(file_list),
                                     error_message='Did not receive expected "Sending FIM event: ..." event').result()
    for ev in events:
        validate_event(ev, mode=mode)
    # Remove folder
    shutil.rmtree(folder, ignore_errors=True)
    check_time_travel(scheduled, monitor=wazuh_log_monitor)
    # Expect deleted events
    event_list = wazuh_log_monitor.start(timeout=global_parameters.default_timeout, callback=callback_detect_event,
                                         error_message='Did not receive expected '
                                                       '"Sending FIM event: ..." event',
                                         accum_results=len(file_list)).result()
    path_list = set([event['data']['path'] for event in event_list])
    counter_type = Counter([event['data']['type'] for event in event_list])
    for ev in events:
        validate_event(ev, mode=mode)
    assert counter_type['deleted'] == len(file_list), f'Number of "deleted" events should be {len(file_list)}'
    for file in file_list:
        assert os.path.join(folder, file) in path_list, f'File {file} not found within the events'