code: def test_weighted_spans_char():
      doc = "I see: a leaning lemon tree"
      vec = CountVectorizer(analyzer="char", ngram_range=(3, 4))
      vec.fit([doc])
      w_spans = get_weighted_spans(
          doc,
          vec,
          FeatureWeights(
              pos=[FW("see", 2), FW("a le", 5), FW("on ", 8)],
              neg=[FW("lem", -6)],
          ),
      )
      assert w_spans == WeightedSpans(
          [
              DocWeightedSpans(
                  document="i see: a leaning lemon tree",
                  spans=[
                      ("see", [(2, 5)], 2),
                      ("lem", [(17, 20)], -6),
                      ("on ", [(20, 23)], 8),
                      ("a le", [(7, 11)], 5),
                  ],
                  preserve_density=True,
              )
          ],
          other=FeatureWeights(
              pos=[FW(hl_in_text, 9)],
              neg=[],
          ),
      )
  
file_path: eli5/tests/test_sklearn_text.py
imports: from sklearn.feature_extraction.text import CountVectorizer
  from sklearn.pipeline import FeatureUnion
  from eli5.base import DocWeightedSpans, WeightedSpans, FeatureWeights, FeatureWeight
  from eli5.formatters import FormattedFeatureName
  from eli5.sklearn.text import get_weighted_spans
label_desc: Use image node_id 4 for calling a global function with example usage: test_weighted_spans_char() without return types