def info_from_active_selection(self, source_name):
        """Display info about active selection node.

        Parameters
        ==========
        source_name (string)
            name indicating the kind of source to be
            shown; can be 'node_script' or 'callable_info'.
        """

        ### if there's no active selection, notify user
        ### and return earlier

        if not self.active_obj:

            create_and_show_dialog(
                (
                    "A node must be selected for the source"
                    " info to be displayed."
                ),
                level_name='info',
            )

            return

        ### likewise, if an object uncompatible with the
        ### feature is selected, notify user and return
        ### earlier

        elif type(self.active_obj) in (
            TextBlock,
            ProxyNode,
        ):

            create_and_show_dialog(
                (
                    "The source/info viewing feature does not"
                    " apply to text blocks, data nodes or"
                    " redirect nodes"
                ),
                level_name='info',
            )

            return

        self.view_info(self.active_obj, source_name)
Display info about active selection node.

        Parameters
        ==========
        source_name (string)
            name indicating the kind of source to be
            shown; can be 'node_script' or 'callable_info'.
        
nodezator/editing/data.py