code: def test_ordered():
      # Issue 7210 - this had been failing with python2/3 problems
      assert list(ordered([{1: 3, 2: 4, 9: 10}, {1: 3}])) == [
          {1: 3},
          {1: 3, 2: 4, 9: 10},
      ]
      # warnings should not be raised for identical items
      l = [1, 1]
      assert list(ordered(l, warn=True)) == l
      l = [[1], [2], [1]]
      assert list(ordered(l, warn=True)) == [[1], [1], [2]]
      raises(
          ValueError,
          lambda: list(
              ordered(
                  ["a", "ab"],
                  keys=[lambda x: x[0]],
                  default=False,
                  warn=True,
              )
          ),
      )
  
imports: from sympy.core.sorting import default_sort_key, ordered
  from sympy.testing.pytest import raises
  from sympy.abc import x
label_desc: Use image node_id 2 for calling a global function with example usage: test_ordered() without return types