def decompile_function(self, func: Function, curr_ins=None, view=None) -> None:
        """
        Decompile a function and switch to decompiled view. If curr_ins is
        defined, then also switch cursor focus to the position associated
        with the asm instruction addr

        :param func: The function to decompile
        :param curr_ins: The instruction the cursor was at before switching to decompiled view
        :param view: The decompiled qt text view
        :return:
        """

        if view is None or view.category != "pseudocode":
            view = self._get_or_create_view("pseudocode", CodeView)

        view.function.am_obj = func
        view.function.am_event(focus=True, focus_addr=curr_ins)

        Decompile a function and switch to decompiled view. If curr_ins is
        defined, then also switch cursor focus to the position associated
        with the asm instruction addr

        :param func: The function to decompile
        :param curr_ins: The instruction the cursor was at before switching to decompiled view
        :param view: The decompiled qt text view
        :return:
        
angrmanagement/ui/workspace.py