def get_function_for_event(self, event: TraceEvent) -> Function | None:
        """
        Find currently execution function at `event`.
        """
        # Rewind to last block event
        if event and not isinstance(event, bintrace.FBBlockEvent):
            event = self._btrace.get_prev_bb_event(event, vcpu=self._trace_dbg.vcpu)
        if event is None:
            return None

        # Determine what function we are in currently.
        node = self.workspace.main_instance.cfg.get_node(event.Addr())
        if node is None:
            return None

        kb = self.workspace.main_instance.project.kb
        if node.function_address in kb.functions:
            return kb.functions[node.function_address], event
        else:
            _l.warning("Node %s not found in functions db", node)
            return None

        Find currently execution function at `event`.
        
angrmanagement/logic/debugger/bintrace.py