code: def _compare_eq_iterable(left, right, verbose=0):
      if not verbose:
          return ["Use -v to get the full diff"]
      # dynamic import to speedup pytest
      import difflib
  
      try:
          left_formatting = pprint.pformat(left).splitlines()
          right_formatting = pprint.pformat(right).splitlines()
          explanation = ["Full diff:"]
      except Exception:
          # hack: PrettyPrinter.pformat() in python 2 fails when formatting items that can't be sorted(), ie, calling
          # sorted() on a list would raise. See issue #718.
          # As a workaround, the full diff is generated by using the repr() string of each item of each container.
          left_formatting = sorted(repr(x) for x in left)
          right_formatting = sorted(repr(x) for x in right)
          explanation = [
              "Full diff (fallback to calling repr on each item):"
          ]
      explanation.extend(
          line.strip()
          for line in difflib.ndiff(left_formatting, right_formatting)
      )
      return explanation
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import pprint
  import six
  import _pytest._code
  from ..compat import Sequence
  from _pytest import outcomes
  from _pytest._io.saferepr import saferepr
  from _pytest.compat import ATTRS_EQ_FIELD
label_desc: Use image node_id 15 for calling a global function with example usage: _compare_eq_iterable(left, right, verbose) and returns: explanation, list