#NEWLINE# def _verify_centralizer( group , arg , centr = None ) : #NEWLINE# #INDENT# '\n    Verify the centralizer of a group/set/element inside another group.\n\n    This is used for testing ``.centralizer()`` from\n    ``sympy.combinatorics.perm_groups``\n\n    Examples\n    ========\n\n    >>> from sympy.combinatorics.named_groups import (SymmetricGroup,\n    ... AlternatingGroup)\n    >>> from sympy.combinatorics.perm_groups import PermutationGroup\n    >>> from sympy.combinatorics.permutations import Permutation\n    >>> from sympy.combinatorics.testutil import _verify_centralizer\n    >>> S = SymmetricGroup(5)\n    >>> A = AlternatingGroup(5)\n    >>> centr = PermutationGroup([Permutation([0, 1, 2, 3, 4])])\n    >>> _verify_centralizer(S, A, centr)\n    True\n\n    See Also\n    ========\n\n    _naive_list_centralizer,\n    sympy.combinatorics.perm_groups.PermutationGroup.centralizer,\n    _cmp_perm_lists\n\n    ' #NEWLINE# if ( centr is None ) : #NEWLINE# #INDENT# centr = group . centralizer ( arg ) #NEWLINE# #UNINDENT# centr_list = list ( centr . generate_dimino ( af = True ) ) #NEWLINE# centr_list_naive = _naive_list_centralizer ( group , arg , af = True ) #NEWLINE# return _cmp_perm_lists ( centr_list , centr_list_naive )