def job_pod_enricher(event: JobEvent, params: JobPodEnricherParams):
    """
    Given a Kubernetes job, get information about the latest job pod.

    Used to get the related pod's events and/or logs
    """
    job = event.get_job()
    if not job:
        logging.error(f"cannot run job_pod_enricher on alert with no job object: {event}")
        return

    pod = get_job_latest_pod(job)

    if not pod:
        logging.info(f"No pods for job {job.metadata.namespace}/{job.metadata.name}")
        return

    if params.events:
        events_table_block = get_resource_events_table(
            "*Job pod events:*",
            pod.kind,
            pod.metadata.name,
            pod.metadata.namespace,
            included_types=params.included_types,
            max_events=params.max_events,
        )
        if events_table_block:
            event.add_enrichment([events_table_block], {SlackAnnotations.ATTACHMENT: True})

    if params.logs:
        regex_replacement_style = (
            RegexReplacementStyle[params.regex_replacement_style] if params.regex_replacement_style else None
        )
        log_data = pod.get_logs(
            regex_replacer_patterns=params.regex_replacer_patterns,
            regex_replacement_style=regex_replacement_style,
            filter_regex=params.filter_regex,
            previous=params.previous,
        )
        if log_data:
            event.add_enrichment(
                [FileBlock(filename=f"{pod.metadata.name}.log", contents=log_data.encode())],
            )

    Given a Kubernetes job, get information about the latest job pod.

    Used to get the related pod's events and/or logs
    
playbooks/robusta_playbooks/job_actions.py