def alert_graph_enricher(alert: PrometheusKubernetesAlert, params: AlertResourceGraphEnricherParams):
    """
    Attach a resource-usage graph. The graph is automatically fetched for the Pod/Node that triggered this action.
    """
    alert_labels = alert.alert.labels
    labels = {x: alert_labels[x] for x in alert_labels}
    node = alert.get_node()
    if node:
        internal_ip = get_node_internal_ip(node)
        if internal_ip:
            labels["node_internal_ip"] = internal_ip

    graph_enrichment = create_resource_enrichment(
        alert.alert.startsAt,
        labels,
        ResourceChartResourceType[params.resource_type],
        ResourceChartItemType[params.item_type],
        prometheus_params=params,
        graph_duration_minutes=params.graph_duration_minutes,
    )
    alert.add_enrichment([graph_enrichment], enrichment_type=EnrichmentType.graph, title="Resources")

    Attach a resource-usage graph. The graph is automatically fetched for the Pod/Node that triggered this action.
    
playbooks/robusta_playbooks/alerts_integration.py