class_docstr: Sends a message to Slack upon completion/failing of an experiment.
code: def failed_event(self, fail_time, fail_trace):
      import requests
  
      if self.failed_text is None:
          return
  
      self.run["fail_trace"] = fail_trace
      self.run["error"] = fail_trace[-1].strip()
      self.run["fail_time"] = fail_time
      self.run["elapsed_time"] = td_format(
          fail_time - self.run["start_time"]
      )
  
      data = {
          "username": self.bot_name,
          "icon_emoji": self.icon,
          "text": self.get_failed_text(),
      }
      headers = {
          "Content-type": "application/json",
          "Accept": "text/plain",
      }
      requests.post(
          self.webhook_url, data=json.dumps(data), headers=headers
      )
  
file_path: sacred/sacred/observers/slack.py
imports: from sacred.observers.base import RunObserver, td_format
  from sacred.config.config_files import load_config_file
  import json
label_desc: Use image node_id 9 for calling the SlackObserver obj's underlying member method code with example usage: obj.failed_event(fail_time, fail_trace) without return types