class_docstr: This class represents an abstract partition.
  
  A partition is a set of disjoint sets whose union equals a given set.
  
  See Also
  ========
  
  sympy.utilities.iterables.partitions,
  sympy.utilities.iterables.multiset_partitions
docstr: Generates a new partition object.
  
  This method also verifies if the arguments passed are
  valid and raises a ValueError if they are not.
  
  Examples
  ========
  
  Creating Partition from Python lists:
  
  >>> from sympy.combinatorics import Partition
  >>> a = Partition([1, 2], [3])
  >>> a
  Partition({3}, {1, 2})
  >>> a.partition
  [[1, 2], [3]]
  >>> len(a)
  2
  >>> a.members
  (1, 2, 3)
  
  Creating Partition from Python sets:
  
  >>> Partition({1, 2, 3}, {4, 5})
  Partition({4, 5}, {1, 2, 3})
  
  Creating Partition from SymPy finite sets:
  
  >>> from sympy import FiniteSet
  >>> a = FiniteSet(1, 2, 3)
  >>> b = FiniteSet(4, 5)
  >>> Partition(a, b)
  Partition({4, 5}, {1, 2, 3})
code: def __new__(cls, *partition):
      """
      Generates a new partition object.
  
      This method also verifies if the arguments passed are
      valid and raises a ValueError if they are not.
  
      Examples
      ========
  
      Creating Partition from Python lists:
  
      >>> from sympy.combinatorics import Partition
      >>> a = Partition([1, 2], [3])
      >>> a
      Partition({3}, {1, 2})
      >>> a.partition
      [[1, 2], [3]]
      >>> len(a)
      2
      >>> a.members
      (1, 2, 3)
  
      Creating Partition from Python sets:
  
      >>> Partition({1, 2, 3}, {4, 5})
      Partition({4, 5}, {1, 2, 3})
  
      Creating Partition from SymPy finite sets:
  
      >>> from sympy import FiniteSet
      >>> a = FiniteSet(1, 2, 3)
      >>> b = FiniteSet(4, 5)
      >>> Partition(a, b)
      Partition({4, 5}, {1, 2, 3})
      """
      args = []
      dups = False
      for arg in partition:
          if isinstance(arg, list):
              as_set = set(arg)
              if len(as_set) < len(arg):
                  dups = True
                  break  # error below
              arg = as_set
          args.append(_sympify(arg))
  
      if not all(isinstance(part, FiniteSet) for part in args):
          raise ValueError(
              "Each argument to Partition should be "
              "a list, set, or a FiniteSet"
          )
  
      # sort so we have a canonical reference for RGS
      U = Union(*args)
      if dups or len(U) < sum(len(arg) for arg in args):
          raise ValueError("Partition contained duplicate elements.")
  
      obj = FiniteSet.__new__(cls, *args)
      obj.members = tuple(U)
      obj.size = len(U)
      return obj
  
imports: from sympy.core import Basic, Dict, sympify, Tuple
  from sympy.core.numbers import Integer
  from sympy.core.sorting import default_sort_key
  from sympy.core.sympify import _sympify
  from sympy.functions.combinatorial.numbers import bell
  from sympy.matrices import zeros
  from sympy.sets.sets import FiniteSet, Union
  from sympy.utilities.iterables import flatten, group
  from sympy.utilities.misc import as_int
  from collections import defaultdict
label_desc: Use image node_id 1 for calling the Partition obj's underlying member method code with example usage: obj.__new__(cls) and returns: obj