class_docstr: Sends a message to Telegram upon completion/failing of an experiment.
class_docstr_tok: ["Sends","a","message","to","Telegram","upon","completion\/failing","of","an","experiment","."]
code: def interrupted_event(self, interrupt_time, status):
      import telegram
  
      if self.interrupted_text is None:
          return
  
      self.run["status"] = status
      self.run["interrupt_time"] = interrupt_time
      self.run["elapsed_time"] = td_format(
          interrupt_time - self.run["start_time"]
      )
  
      try:
          self.bot.send_message(
              chat_id=self.chat_id,
              text=self.get_interrupted_text(),
              disable_notification=False,
              parse_mode=telegram.ParseMode.MARKDOWN,
          )
      except Exception as e:
          log = logging.getLogger("telegram-observer")
          log.warning(
              "failed to send interrupted_event message "
              "via telegram.",
              exc_info=e,
          )
  
file_path: sacred/sacred/observers/telegram_obs.py
imports: from sacred.observers.base import RunObserver, td_format
  from sacred.config.config_files import load_config_file
  import logging
label_desc: Use image node_id 10 for calling the TelegramObserver obj's underlying member method code with example usage: obj.interrupted_event(interrupt_time, status) without return types