code: def _try_get_slack_api(
      cmdline_args: List[str],
  ) -> Optional[gokart.slack.SlackAPI]:
      with CmdlineParser.global_instance(cmdline_args):
          config = gokart.slack.SlackConfig()
          token = os.getenv(config.token_name, "")
          channel = config.channel
          to_user = config.to_user
          if token and channel:
              logger.info("Slack notification is activated.")
              return gokart.slack.SlackAPI(
                  token=token, channel=channel, to_user=to_user
              )
      logger.info("Slack notification is not activated.")
      return None
  
file_path: gokart/gokart/run.py
imports: import os
  import sys
  from logging import getLogger
  from typing import List, Optional
  import luigi
  import luigi.cmdline
  import luigi.retcodes
  from luigi.cmdline_parser import CmdlineParser
  import gokart
  import gokart.slack
  from gokart.object_storage import ObjectStorage
label_desc: Use image node_id 4 for calling a global function with example usage: _try_get_slack_api(cmdline_args) and returns: None, gokart