code: def has_any_values_for_weights(explanation):
      # type: (Explanation) -> bool
      if explanation.targets:
          return any(
              fw.value is not None
              for t in explanation.targets
              if t.feature_weights is not None
              for fw in chain(
                  t.feature_weights.pos, t.feature_weights.neg
              )
          )
      else:
          return False
  
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 5 for calling a global function with example usage: has_any_values_for_weights(explanation) and returns: any, False