def METHOD_NAME(provider: str, config_file_path: str) -> dict:
    """
    load_and_validate_config_file reads the Prowler config file in YAML format from the default location or the file passed with the --config-file flag
    """
    try:
        with open(config_file_path) as f:
            config = {}
            config_file = yaml.safe_load(f)
            # Not to introduce a breaking change we have to allow the old format config file without any provider keys
            # and a new format with a key for each provider to include their configuration values within
            # Check if the new format is passed
            if "aws" in config_file or "gcp" in config_file or "azure" in config_file:
                config = config_file.get(provider, {})
            else:
                config = config_file if config_file else {}
                # Not to break Azure and GCP does not support neither use the old config format
                if provider in ["azure", "gcp"]:
                    config = {}
            return config
    except Exception as error:
        logger.critical(
            f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}] -- {error}"
        )
        sys.exit(1)