code: def has_safe_repr(value):
      
      if value is None or value is NotImplemented or value is Ellipsis:
          return True
      if type(value) in (bool, int, float, complex, range_type, Markup) + string_types:
          return True
      if type(value) in (tuple, list, set, frozenset):
          for item in value:
              if not has_safe_repr(item):
                  return False
          return True
      elif type(value) is dict:
          for key, value in iteritems(value):
              if not has_safe_repr(key):
                  return False
              if not has_safe_repr(value):
                  return False
          return True
      return False
docs: Does the node have a safe representation?