code: def test_try_to_send_event_summary_to_slack(
      self, make_tree_info_mock: MagicMock
  ):
      event_aggregator_mock = MagicMock()
      event_aggregator_mock.get_summury.return_value = (
          f"{__name__}._DummyTask"
      )
      event_aggregator_mock.get_event_list.return_value = (
          f"{__name__}._DummyTask:[]"
      )
      make_tree_info_mock.return_value = "tree"
  
      def get_content(content: str, **kwargs):
          self.output = content
  
      slack_api_mock = MagicMock()
      slack_api_mock.send_snippet.side_effect = get_content
  
      cmdline_args = [f"{__name__}._DummyTask", "--param", "test"]
      with patch("gokart.slack.SlackConfig.send_tree_info", True):
          _try_to_send_event_summary_to_slack(
              slack_api_mock, event_aggregator_mock, cmdline_args
          )
      expects = os.linesep.join(
          [
              "===== Event List ====",
              event_aggregator_mock.get_event_list(),
              os.linesep,
              "==== Tree Info ====",
              "tree",
          ]
      )
  
      results = self.output
      self.assertEqual(expects, results)
  
      cmdline_args = [f"{__name__}._DummyTask", "--param", "test"]
      with patch("gokart.slack.SlackConfig.send_tree_info", False):
          _try_to_send_event_summary_to_slack(
              slack_api_mock, event_aggregator_mock, cmdline_args
          )
      expects = os.linesep.join(
          [
              "===== Event List ====",
              event_aggregator_mock.get_event_list(),
              os.linesep,
              "==== Tree Info ====",
              "Please add SlackConfig.send_tree_info to include tree-info",
          ]
      )
  
      results = self.output
      self.assertEqual(expects, results)
  
file_path: gokart/test/test_run.py
imports: import os
  import unittest
  from unittest.mock import MagicMock, patch
  import luigi
  import luigi.mock
  import gokart
  from gokart.run import _try_to_send_event_summary_to_slack
label_desc: Use image node_id 5 for calling the RunTest obj's underlying member method code with example usage: obj.test_try_to_send_event_summary_to_slack(make_tree_info_mock) without return types