code: def test_slack_message_sanitization():
      test_uid = "17213535"
      target_message_1 = "You can sit here if you want"
      target_message_2 = "Hey, you can sit here if you want !"
      target_message_3 = "Hey, you can sit here if you want!"
      target_message_4 = "convert garbled url to vicdb-f.net"
      target_message_5 = "convert multiple garbled url to vicdb-f.net. Also eemdb-p.net"
  
      uid_token = f"<@{test_uid}>"
      raw_messages = [
          test.format(uid=uid_token)
          for test in [
              "You can sit here {uid} if you want{uid}",
              "{uid} You can sit here if you want{uid} ",
              "{uid}You can sit here if you want {uid}",
              # those last cases may be disputable
              # as we're virtually altering the entered text,
              # but this seem to be the correct course of action
              # (to be decided)
              "You can sit here{uid}if you want",
              "Hey {uid}, you can sit here if you want{uid}!",
              "Hey{uid} , you can sit here if you want {uid}!",
              "convert garbled url to <http://vicdb-f.net|vicdb-f.net>",
              "convert multiple garbled url to <http://vicdb-f.net|vicdb-f.net>. "
              "Also <http://eemdb-p.net|eemdb-p.net>",
          ]
      ]
  
      target_messages = [
          target_message_1,
          target_message_1,
          target_message_1,
          target_message_1,
          target_message_2,
          target_message_3,
          target_message_4,
          target_message_5,
      ]
  
      sanitized_messages = [
          SlackInput._sanitize_user_message(message, [test_uid])
          for message in raw_messages
      ]
  
      # no message that is wrongly sanitized please
      assert (
          len(
              [
                  sanitized
                  for sanitized, target in zip(
                      sanitized_messages, target_messages
                  )
                  if sanitized != target
              ]
          )
          == 0
      )
  
imports: from http import HTTPStatus
  import json
  import logging
  import time
  from typing import Any, Dict, Text
  from unittest import mock
  from unittest.mock import Mock, patch
  from aioresponses import aioresponses
  import pytest
  from sanic.compat import Header
  from sanic.request import Request
  from rasa.core.channels import SlackInput
  from rasa.core.channels.channel import UserMessage
  from rasa.shared.exceptions import InvalidConfigException
  from tests.utilities import json_of_latest_request, latest_request
label_desc: Use image node_id 6 for calling a global function with example usage: test_slack_message_sanitization() without return types