docs: def write_artifacts_metadata(self):
          """Write out a JSON file with all built targets artifact metadata,
             if such output file is specified."""
          if self.conf.artifacts_metadata_file:
              logger.info('Writing artifacts metadata to file "%s"',
                          self.conf.artifacts_metadata_file)
              with open(self.conf.artifacts_metadata_file, 'w') as fp:
                  json.dump(self.artifacts_metadata, fp)