code: def test_render_weighted_spans_char():
      weighted_spans = DocWeightedSpans(
          document="see",
          spans=[
              ("se", [(0, 2)], 0.2),
              ("ee", [(1, 3)], 0.1),
          ],
          preserve_density=True,
      )
      s = _render_weighted_spans(weighted_spans)
      assert s == (
          "<span"
          ' style="background-color: hsl(120, 100.00%, 69.88%); opacity: 0.93"'
          ' title="0.100">s</span>'
          "<span"
          ' style="background-color: hsl(120, 100.00%, 60.00%); opacity: 1.00"'
          ' title="0.150">e</span>'
          "<span"
          ' style="background-color: hsl(120, 100.00%, 81.46%); opacity: 0.87"'
          ' title="0.050">e</span>'
      )
  
imports: import re
  import pytest
  import numpy
  from sklearn.datasets import make_regression
  from sklearn.linear_model import LinearRegression
  from eli5.base import DocWeightedSpans, FeatureWeight
  from eli5 import explain_weights_sklearn, explain_prediction_sklearn
  from eli5.formatters import format_as_text, format_as_html, format_html_styles, FormattedFeatureName
  from eli5.formatters.html import _format_unhashed_feature, render_weighted_spans, _format_single_feature, _format_feature, remaining_weight_color_hsl, weight_color_hsl
  from eli5.formatters.text_helpers import get_char_weights, PreparedWeightedSpans
  from .utils import write_html
label_desc: Use image node_id 11 for calling a global function with example usage: test_render_weighted_spans_char() without return types