code: def bootstrap_message_classes(message):
      
      extra_tags = None
      try:
          extra_tags = message.extra_tags
      except AttributeError:
          pass
      if not extra_tags:
          extra_tags = ""
      classes = [extra_tags]
      try:
          level = message.level
      except AttributeError:
          pass
      else:
          try:
              classes.append(MESSAGE_LEVEL_CLASSES[level])
          except KeyError:
              classes.append("alert alert-danger")
      return " ".join(classes).strip()
docs: Return the message classes for a message