def _eap_check_config(eap_config: Dict[str, Any]) -> Dict[str, Any]:
    """ Check the eap specific args, and replace values where needed.

    Similar to _check_configure_args but for only EAP.
    """
    eap_type = eap_config.get('eapType')
    for method in EAP_CONFIG_SHAPE['options']:
        if method['name'] == eap_type:
            options = method['options']
            break
    else:
        raise ConfigureArgsError('EAP method {} is not valid'.format(eap_type))

    _eap_check_no_extra_args(eap_config, options)

    for opt in options:  # type: ignore
        # Ignoring most types to do with EAP_CONFIG_SHAPE because of issues
        # wth type inference for dict comprehensions
        _eap_check_option_ok(opt, eap_config)
        if opt['type'] == 'file' and opt['name'] in eap_config:
            # Special work for file: rewrite from key id to path
            eap_config[opt['name']] = _get_key_file(eap_config[opt['name']])
    return eap_config
Check the eap specific args, and replace values where needed.

    Similar to _check_configure_args but for only EAP.