def _needs_aml_client(config):
    """Check if azureml_client is needed for the given config.

    Return the path to insert azureml_client and the type of the config.
    """
    if not isinstance(config, dict):
        return None, None

    config_type = config.get("type")

    support_types = {
        "AzureML Resource Path": {
            "types": AZUREML_RESOURCE_TYPES,
            "param": "azureml_client",
        },
        "AzureML System": {
            "types": ["AzureML"],
            "param": "azureml_client_config",
        },
    }
    for type_name, type_info in support_types.items():
        if config_type not in type_info["types"]:
            continue

        # check if azureml_client is already provided
        # it could be provided in the config or in the config's config
        if config.get(type_info["param"]) or config.get("config", {}).get(type_info["param"]):
            return None, None

        # will directly insert azureml_client into the config
        return (type_info["param"],), type_name

    return None, None
Check if azureml_client is needed for the given config.

    Return the path to insert azureml_client and the type of the config.
    
olive/workflows/run/config.py