code: def test_unhashed_features_other():
      """Check that when there are several candidates, they do not appear in "other"
      if at least one is found. If none are found, they should appear in "other"
      together.
      """
      doc = "I see: a leaning lemon tree"
      vec = CountVectorizer(analyzer="char", ngram_range=(3, 3))
      vec.fit([doc])
      w_spans = get_weighted_spans(
          doc,
          vec,
          FeatureWeights(
              pos=[
                  FW(
                      [
                          {"name": "foo", "sign": 1},
                          {"name": "see", "sign": -1},
                      ],
                      2,
                  ),
                  FW(
                      [
                          {"name": "zoo", "sign": 1},
                          {"name": "bar", "sign": 1},
                      ],
                      3,
                  ),
              ],
              neg=[
                  FW(
                      [
                          {"name": "ree", "sign": 1},
                          {"name": "tre", "sign": 1},
                      ],
                      -4,
                  ),
              ],
          ),
      )
      assert w_spans == WeightedSpans(
          [
              DocWeightedSpans(
                  document="i see: a leaning lemon tree",
                  spans=[
                      ("see", [(2, 5)], 2),
                      ("tre", [(23, 26)], -4),
                      ("ree", [(24, 27)], -4),
                  ],
                  preserve_density=True,
              )
          ],
          other=FeatureWeights(
              pos=[
                  FW(
                      [
                          {"name": "zoo", "sign": 1},
                          {"name": "bar", "sign": 1},
                      ],
                      3,
                  ),
              ],
              neg=[FW(hl_in_text, -2)],
          ),
      )
  
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 8 for calling a global function with example usage: test_unhashed_features_other() without return types