code: def button_choices_from_message_data(
      message: Dict[Text, Any], allow_free_text_input: bool = True
  ) -> List[Text]:
      """Return list of choices to present to the user.
  
      If allow_free_text_input is True, an additional option is added
      at the end along with the response buttons that allows the user
      to type in free text.
      """
      choices = [
          button_to_string(button, idx)
          for idx, button in enumerate(message.get("buttons"))
      ]
      if allow_free_text_input:
          choices.append(FREE_TEXT_INPUT_PROMPT)
      return choices
  
imports: import json
  import argparse
  import logging
  import os
  import sys
  import time
  from types import FrameType
  from typing import Any, Dict, List, Optional, TYPE_CHECKING, Text, Union, overload
  import randomname
  import rasa.shared.utils.cli
  import rasa.shared.utils.io
  from rasa.shared.importers.importer import TrainingDataImporter
  from rasa.shared.constants import ASSISTANT_ID_DEFAULT_VALUE, ASSISTANT_ID_KEY, DEFAULT_CONFIG_PATH
  from rasa.shared.utils.cli import print_error
  from rasa import telemetry
label_desc: Use image node_id 17 for calling a global function with example usage: button_choices_from_message_data(message, allow_free_text_input) and returns: choices