code: def meta_enter_message(python_input):
      
      def get_text_fragments():
          return [('class:accept-message', ' [Meta+Enter] Execute ')]
  
      def extra_condition():
          " Only show when... "
          b = python_input.default_buffer
  
          return (
              python_input.show_meta_enter_message and
              (not b.document.is_cursor_at_the_end or
                  python_input.accept_input_on_enter is None) and
              '\n' in b.text)
  
      visible = ~is_done & has_focus(DEFAULT_BUFFER) & Condition(extra_condition)
  
      return ConditionalContainer(
          content=Window(FormattedTextControl(get_text_fragments)),
          filter=visible)
docs: Create the `Layout` for the 'Meta+Enter` message.