def get_partition_count(context, default=0):
    """Returns the number of partitions of this AR
    """
    if not is_ar(context):
        return default

    parent = context.getParentAnalysisRequest()

    if not parent:
        return default

    return len(parent.getDescendants())
def get_partition_count ( context , default = 0 ) : if not is_ar ( context ) : return default parent = context . getParentAnalysisRequest ( ) if not parent : return default return len ( parent . getDescendants ( ) )
Returns the number of partitions of this AR