code: def dump_value(value):
      # XXX this is hackish, but collections.abc is not available in python 2
      if hasattr(value, "__dict__") or isinstance(
          value, (dict, tuple, list)
      ):
          value = yaml.dump(value, default_flow_style=True)
          value = value.replace("\n", "")
          value = value.replace("...", "")
          return "'{}'".format(value)
      else:
          # primitive types
          return str(value)
  
imports: from __future__ import absolute_import
  from __future__ import print_function
  from __future__ import division
  import importlib
  import os
  import sys
  import yaml
  import collections
  from .config.schema import SchemaDict, SharedConfig, extract_schema
  from .config.yaml_helpers import serializable
label_desc: Use image node_id 1 for calling a global function with example usage: dump_value(value) and returns: str, str