code: def format_errors(errors, indent=0, prefix='', suffix=''):
      
      if is_single_item_iterable(errors):
          errors = errors[0]
      if isinstance(errors, SINGULAR_TYPES):
          yield indent_message(repr(errors), indent, prefix=prefix, suffix=suffix)
  
      elif isinstance(errors, collections.Mapping):
          for key, value in errors.items():
              assert isinstance(key, SINGULAR_TYPES), type(key)
              if isinstance(value, SINGULAR_TYPES):
                  message = "{0}: {1}".format(repr(key), repr(value))
                  yield indent_message(message, indent, prefix=prefix, suffix=suffix)
              else:
                  yield indent_message(repr(key), indent, prefix=prefix, suffix=':')
                  for message in format_errors(value, indent + 4, prefix='- '):
                      yield message
  
      elif is_non_string_iterable(errors):
          # for making the rhs of the numbers line up
          extra_indent = int(math.ceil(math.log10(len(errors)))) + 2
          for index, value in enumerate(errors):
              list_prefix = "{0}. ".format(index)
              messages = format_errors(
                  value,
                  indent=indent + extra_indent - len(list_prefix),
                  prefix=list_prefix,
              )
              for message in messages:
                  yield message
      else:
          assert False, "should not be possible"
docs: string: "example"
  
          "example"
  
      dict:
          "example":
              -