def _handle_assets(self, relpath, params):
    if self._settings.assets_dir:
      abspath = os.path.normpath(os.path.join(self._settings.assets_dir, relpath))
      with open(abspath, 'r') as infile:
        content = infile.read()
    else:
      content = pkgutil.get_data(__name__, os.path.join('assets', relpath))
    content_type = mimetypes.guess_type(relpath)[0] or 'text/plain'
    self._send_content(content, content_type)
Statically serve assets: js, css etc.
dataset/ETHPy150Open pantsbuild/pants/src/python/pants/reporting/reporting_server.py/PantsHandler._handle_assets