code: def python_sidebar_help(python_input):
      
      token = 'class:sidebar.helptext'
  
      def get_current_description():
          """
          Return the description of the selected option.
          """
          i = 0
          for category in python_input.options:
              for option in category.options:
                  if i == python_input.selected_option_index:
                      return option.description
                  i += 1
          return ''
  
      def get_help_text():
          return [(token, get_current_description())]
  
      return ConditionalContainer(
          content=Window(
              FormattedTextControl(get_help_text),
              style=token,
              height=Dimension(min=3)),
          filter=ShowSidebar(python_input) &
                 Condition(lambda: python_input.show_sidebar_help) & ~is_done)
docs: Create the `Layout` for the help text for the current item in the sidebar.