code: def from_config(cls, filename):
          
          d = load_config_file(filename)
          obs = None
          if 'webhook_url' in d:
              obs = cls(d['webhook_url'])
          else:
              raise ValueError("Slack configuration file must contain "
                               "an entry for 'webhook_url'!")
          for k in ['completed_text', 'interrupted_text', 'failed_text',
                    'bot_name', 'icon']:
              if k in d:
                  setattr(obs, k, d[k])
          return obs
docs: Create a SlackObserver from a given configuration file.
  
          The file can be in any format supported by Sacred
          (.json, .pickle, [.yaml]).
          It has to specify a ``webhook_url`` and can optionally set
          ``bot_name``, ``icon``, ``completed_text``, ``interrupted_text``, and
          ``failed_text``.