code: def format_as_dict(explanation):
      """Return a dictionary representing the explanation that can be JSON-encoded.
      It accepts parts of explanation (for example feature weights) as well.
      """
      return _numpy_to_python(attr.asdict(explanation))
  
imports: import six
  import attr
  import numpy
  from .features import FormattedFeatureName
label_desc: Use image node_id 1 for calling a global function with example usage: format_as_dict(explanation) and returns: _numpy_to_python