code: def create_module_docs():
      
      data = core_module_docstrings(format="rst")
      # get screenshot data
      screenshots_data = {}
      samples = get_samples()
      for sample in samples.keys():
          module = sample.split("-")[0]
          if module not in screenshots_data:
              screenshots_data[module] = []
          screenshots_data[module].append(sample)
  
      out = []
      # details
      for module in sorted(data.keys()):
          out.append("\n.. _module_%s:\n" % module)  # reference for linking
          out.append(
              "\n{name}\n{underline}\n\n{screenshots}{details}\n".format(
                  name=module,
                  screenshots=screenshots(screenshots_data, module),
                  underline="-" * len(module),
                  details="".join(markdown_2_rst(data[module])).strip(),
              )
          )
      # write include file
      with open("../doc/modules-info.inc", "w") as f:
          f.write("".join(out))
docs: Create documentation for modules.