def write_output(self, params, packages):
        """
        Функция вызывает определенную функцию для фиксированного out-format
        :param params:
        :param packages:
        :return:
        """
        if params['out_format'] not in _output_format_map:
            raise CrosspmException(
                CROSSPM_ERRORCODE_UNKNOWN_OUT_TYPE,
                'Unknown out_format: [{}]'.format(params['out_format']),
            )

        f = _output_format_map[params['out_format']]
        result = f(self, packages, **params)

        if result:
            out_file_path = os.path.realpath(os.path.expanduser(params['output']))
            self.write_to_file(result, out_file_path)
            self._log.info(
                'Write packages info to file [%s]\ncontent:\n\n%s',
                out_file_path,
                result,
            )