def METHOD_NAME(tags_to_apply, get_configuration, configure_api_environment,
                         restart_api, wait_for_start, get_api_details):
    '''
    description: Check if 'drop_privileges' affects the user of the API process.
                 In this test, the 'PID' of the API process is obtained. After that,
                 it gets the user ('root' or 'wazuh') and checks if it matches the
                 'drop_privileges' setting.
    wazuh_min_version: 4.2.0
    tier: 0
    parameters:
        - 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_api_environment:
            type: fixture
            brief: Configure a custom environment for API testing.
        - restart_api:
            type: fixture
            brief: Reset 'api.log' and start a new monitor.
        - wait_for_start:
            type: fixture
            brief: Wait until the API starts.
        - get_api_details:
            type: fixture
            brief: Get API information.
    assertions:
        - Verify that when 'drop_privileges' is enabled the user who has started the 'wazuh-apid' daemon is 'wazuh'.
        - Verify that when 'drop_privileges' is disabled the user who has started the 'wazuh-apid' daemon is 'root'.
    input_description: Different test cases are contained in an external YAML file (conf.yaml)
                       which includes API configuration parameters.
    expected_output:
        - PID of the 'wazuh-apid' process.
        - r'wazuh' (if 'drop_privileges == yes')
        - r'root' (if 'drop_privileges == no')
    '''
    check_apply_test(tags_to_apply, get_configuration['tags'])
    drop_privileges = get_configuration['configuration']['drop_privileges']
    # Get wazuh-apid process info
    api_process = get_process_cmd('/api/scripts/wazuh-apid.py')
    if not api_process:
        pytest.fail("The process '/api/scripts/wazuh-apid.py' could not be found")
    # Get current user of the process
    proc_stat_file = os.stat("/proc/%d" % api_process.pid)
    uid = proc_stat_file.st_uid
    username = pwd.getpwuid(uid)[0]
    if drop_privileges:
        assert username == 'wazuh', f'Expected user was "wazuh", but the real one is {username}'
    else:
        assert username == 'root', f'Expected user was "root", but the real one is {username}'