def get(self, q, name):
        """
        Utility function for quick retrieval of a widget by name.
        """
        w = q.widgets_map.get(name)
        if not w:
            raise CommandError(f"No such widget: {name}")
        return w

        Utility function for quick retrieval of a widget by name.
        
libqtile/widget/base.py