def create_debugger_pod(
        pod_name: str,
        node_name: str,
        debug_image=PYTHON_DEBUGGER_IMAGE,
        debug_cmd=None,
        env: Optional[List[EnvVar]] = None,
        mount_host_root: bool = False,
        custom_annotations: Optional[Dict[str, str]] = None,
    ) -> "RobustaPod":
        """
        Creates a debugging pod with high privileges
        """

        volume_mounts = None
        volumes = None
        if mount_host_root:
            volume_mounts = [VolumeMount(name="host-root", mountPath="/host")]
            volumes = [Volume(name="host-root", hostPath=HostPathVolumeSource(path="/", type="Directory"))]

        debugger = RobustaPod(
            apiVersion="v1",
            kind="Pod",
            metadata=ObjectMeta(
                name=to_kubernetes_name(pod_name, "debug-"),
                namespace=INSTALLATION_NAMESPACE,
                annotations=custom_annotations,
            ),
            spec=PodSpec(
                serviceAccountName=RUNNER_SERVICE_ACCOUNT,
                hostPID=True,
                nodeName=node_name,
                restartPolicy="OnFailure",
                containers=[
                    Container(
                        name="debugger",
                        image=debug_image,
                        imagePullPolicy="Always",
                        command=prepare_pod_command(debug_cmd),
                        securityContext=SecurityContext(
                            capabilities=Capabilities(add=["SYS_PTRACE", "SYS_ADMIN"]), privileged=True
                        ),
                        volumeMounts=volume_mounts,
                        env=env,
                    )
                ],
                volumes=volumes,
            ),
        )
        # TODO: check the result code
        debugger = debugger.createNamespacedPod(debugger.metadata.namespace).obj
        return debugger

        Creates a debugging pod with high privileges
        
src/robusta/integrations/kubernetes/custom_models.py