code: def should_highlight_spaces(explanation):
      # type: (Explanation) -> bool
      hl_spaces = bool(explanation.highlight_spaces)
      if explanation.feature_importances:
          hl_spaces = hl_spaces or any(
              _has_invisible_spaces(fw.feature)
              for fw in explanation.feature_importances.importances
          )
      if explanation.targets:
          hl_spaces = hl_spaces or any(
              _has_invisible_spaces(fw.feature)
              for target in explanation.targets
              if target.feature_weights is not None
              for weights in [
                  target.feature_weights.pos,
                  target.feature_weights.neg,
              ]
              for fw in weights
          )
      return hl_spaces
  
file_path: eli5/eli5/formatters/utils.py
imports: from __future__ import absolute_import
  from itertools import chain
  import re
  import six
  from typing import Any, Union, List, Dict, Callable, Match, Optional
  import numpy
  from eli5.base import Explanation
  from .features import FormattedFeatureName
label_desc: Use image node_id 3 for calling a global function with example usage: should_highlight_spaces(explanation) and returns: hl_spaces