def event_resource_events(event: EventChangeEvent):
    """
    Given a Kubernetes event, gather all other events on the same resource in the near past
    """
    if not event.get_event():
        logging.error(f"cannot run event_resource_events on alert with no events object: {event}")
        return
    obj = event.obj.regarding
    events_table = get_resource_events_table(
        "Related Events",
        obj.kind,
        obj.name,
        obj.namespace,
    )
    if events_table:
        event.add_enrichment(
            [events_table],
            {SlackAnnotations.ATTACHMENT: True},
            enrichment_type=EnrichmentType.k8s_events,
            title="Related Events",
        )

    Given a Kubernetes event, gather all other events on the same resource in the near past
    
playbooks/robusta_playbooks/event_enrichments.py