code: def _write_reqs(self, reqs):
      print('Writing requirements to "{0}"'.format(self._save_path))
      with open(self._save_path, "w+") as f:
          f.write(
              "# Requirements automatically generated by pigar.\n"
              "# https://github.com/damnever/pigar\n"
          )
          for k, v in reqs.sorted_items():
              f.write("\n")
              f.write(
                  "".join(
                      [
                          "# {0}\n".format(c)
                          for c in v.comments.sorted_items()
                      ]
                  )
              )
              if k == "-e":
                  f.write("{0} {1}\n".format(k, v.version))
              elif v:
                  f.write(
                      "{0} {1} {2}\n".format(
                          k, self._comparison_operator, v.version
                      )
                  )
              else:
                  f.write("{0}\n".format(k))
  
file_path: clearml/clearml/utilities/pigar/__main__.py
imports: from __future__ import print_function, division, absolute_import
  import os
  import codecs
  import six
  from .reqs import project_import_modules, is_std_or_local_lib, is_base_module
  from .utils import lines_diff
  from .log import logger
  from .modules import ReqsModules
label_desc: Use image node_id 5 for calling the GenerateReqs obj's underlying member method code with example usage: obj._write_reqs(reqs) without return types