<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write_metadata(self, output_path):
 """Build a JSON-LD dataset for LSST Projectmeta. Parameters output_path : `str` File path where the ``metadata.jsonld`` should be written for the build. """

        if self._config.lsstdoc is None:
            self._logger.info('No known LSST LaTeX source (--tex argument). '
                              'Not writing a metadata.jsonld file.')
            return

        # Build a JSON-LD dataset for the report+source repository.
        product_data = ltdclient.get_product(self._config)
        metadata = self._config.lsstdoc.build_jsonld(
            url=product_data['published_url'],
            code_url=product_data['doc_repo'],
            ci_url='https://travis-ci.org/' + self._config['github_slug'],
            readme_url=None,
            license_id=None)

        json_text = encode_jsonld(
            metadata,
            separators=(',', ':'),  # compact
            ensure_ascii=False)  # unicode output
        with open(output_path, 'w') as f:
            f.write(json_text)