old_contents: import json
  
  def check_labels(api):
      with open('config.json', 'r') as fd:
          config = json.load(fd)
  
      if not config['active']:
          return
  
      labels = config['labels']
      for label, comment in labels.items():
          if api.payload['label']['name'].lower() == label:
              api.post_comment(comment)
  
  method = check_labels
  
new_contents: import json
  
  def check_labels(api, config):
      if not config.get('active'):
          return
  
      labels = config.get('labels', [])
      for label, comment in labels.items():
          if api.payload['label']['name'].lower() == label:
              api.post_comment(comment)
  
  methods = [check_labels]
  
subject: Support for multiple methods, and leave the config file to hooker