docs: def generate_parsers(config, paths):
      """
      Generate parser for all `paths`.
  
      Args:
          config (dict): Original configuration dictionary used to get matches
                         for unittests. See
                         :mod:`~harvester.autoparser.conf_reader` for details.
          paths (dict): Output from :func:`.select_best_paths`.
  
      Returns:
          str: Python code containing all parsers for `paths`.
      """
      output = """#! /usr/bin/env python
  # -*- coding: utf-8 -*-
  #
  # Interpreter version: python 2.7
  #
  # HTML parser generated by Autoparser
  # (https://github.com/edeposit/edeposit.amqp.harvester)
  #
  import os
  import os.path
  
  import httpkie
  import dhtmlparser
  
  
  # Utilities
  """
      # add source of neighbour picking functions from utils.py
      output += inspect.getsource(conf_reader._get_source) + "\n\n"
      output += inspect.getsource(utils._get_encoding) + "\n\n"
      output += inspect.getsource(utils.handle_encodnig) + "\n\n"
      output += inspect.getsource(utils.is_equal_tag) + "\n\n"
      output += inspect.getsource(utils.has_neigh) + "\n\n"
      output += "# Generated parsers\n"
  
      for name, path in paths.items():
          path = path[0]  # pick path with highest priority
  
          required = config[0]["vars"][name].get("required", False)
          notfoundmsg = config[0]["vars"][name].get("notfoundmsg", "")
  
          output += _generate_parser(name, path, required, notfoundmsg)
  
      output += "# Unittest\n"
      output += _unittest_template(config)
  
      output += "# Run tests of the parser\n"
      output += "if __name__ == '__main__':\n"
      output += IND + "test_parsers()"
  
      return output