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: Returns the "restricted growth string" of the partition.
  
  Explanation
  ===========
  
  The RGS is returned as a list of indices, L, where L[i] indicates
  the block in which element i appears. For example, in a partition
  of 3 elements (a, b, c) into 2 blocks ([c], [a, b]) the RGS is
  [1, 1, 0]: "a" is in block 1, "b" is in block 1 and "c" is in block 0.
  
  Examples
  ========
  
  >>> from sympy.combinatorics import Partition
  >>> a = Partition([1, 2], [3], [4, 5])
  >>> a.members
  (1, 2, 3, 4, 5)
  >>> a.RGS
  (0, 0, 1, 2, 2)
  >>> a + 1
  Partition({3}, {4}, {5}, {1, 2})
  >>> _.RGS
  (0, 0, 1, 2, 3)
code: def RGS(self):
      """
      Returns the "restricted growth string" of the partition.
  
      Explanation
      ===========
  
      The RGS is returned as a list of indices, L, where L[i] indicates
      the block in which element i appears. For example, in a partition
      of 3 elements (a, b, c) into 2 blocks ([c], [a, b]) the RGS is
      [1, 1, 0]: "a" is in block 1, "b" is in block 1 and "c" is in block 0.
  
      Examples
      ========
  
      >>> from sympy.combinatorics import Partition
      >>> a = Partition([1, 2], [3], [4, 5])
      >>> a.members
      (1, 2, 3, 4, 5)
      >>> a.RGS
      (0, 0, 1, 2, 2)
      >>> a + 1
      Partition({3}, {4}, {5}, {1, 2})
      >>> _.RGS
      (0, 0, 1, 2, 3)
      """
      rgs = {}
      partition = self.partition
      for i, part in enumerate(partition):
          for j in part:
              rgs[j] = i
      return tuple(
          [
              rgs[i]
              for i in sorted(
                  [i for p in partition for i in p],
                  key=default_sort_key,
              )
          ]
      )
  
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 9 for calling the Partition obj's underlying member method code with example usage: obj.RGS() and returns: tuple