code: def _get_feature_weights_dict(
      feature_weights,  # type: FeatureWeights
      feature_fn,  # type: Optional[Callable[[str], str]]
  ):
      # type: (...) -> Dict[str, Tuple[float, Tuple[str, int]]]
      """Return {feat_name: (weight, (group, idx))} mapping."""
      return {
          # (group, idx) is an unique feature identifier, e.g. ('pos', 2)
          feat_name: (fw.weight, (group, idx))
          for group in ["pos", "neg"]
          for idx, fw in enumerate(getattr(feature_weights, group))
          for feat_name in _get_features(fw.feature, feature_fn)
      }
  
file_path: eli5/eli5/sklearn/text.py
imports: from __future__ import absolute_import
  from typing import Any, Union, Callable, Dict, List, Optional, Set, Tuple
  from sklearn.pipeline import FeatureUnion
  from eli5.base import DocWeightedSpans, WeightedSpans, FeatureWeights, FeatureWeight, TargetExplanation
  from eli5.formatters import FormattedFeatureName
  from eli5.sklearn.unhashing import InvertableHashingVectorizer
  from eli5.sklearn._span_analyzers import build_span_analyzer
label_desc: Use image node_id 4 for calling a global function with example usage: _get_feature_weights_dict(feature_weights, feature_fn) and returns: unknown