code: def test_partition_constructor():
      raises(ValueError, lambda: Partition([1, 1, 2]))
      raises(ValueError, lambda: Partition([1, 2, 3], [2, 3, 4]))
      raises(ValueError, lambda: Partition(1, 2, 3))
      raises(ValueError, lambda: Partition(*list(range(3))))
  
      assert Partition([1, 2, 3], [4, 5]) == Partition(
          [4, 5], [1, 2, 3]
      )
      assert Partition({1, 2, 3}, {4, 5}) == Partition(
          [1, 2, 3], [4, 5]
      )
  
      a = FiniteSet(1, 2, 3)
      b = FiniteSet(4, 5)
      assert Partition(a, b) == Partition([1, 2, 3], [4, 5])
      assert Partition({a, b}) == Partition(FiniteSet(a, b))
      assert Partition({a, b}) != Partition(a, b)
  
file_path: sympy/sympy/combinatorics/tests/test_partitions.py
imports: from sympy.core.sorting import ordered, default_sort_key
  from sympy.combinatorics.partitions import Partition, IntegerPartition, RGS_enum, RGS_unrank, RGS_rank, random_integer_partition
  from sympy.testing.pytest import raises
  from sympy.utilities.iterables import partitions
  from sympy.sets.sets import Set, FiniteSet
label_desc: Use image node_id 1 for calling a global function with example usage: test_partition_constructor() without return types