def get_pending_pgroup(module, array):
    """ Get Protection Group"""
    pgroup = None
    if ':' in module.params['pgroup']:
        for pgrp in array.list_pgroups(pending=True, on='*'):
            if pgrp['name'] == module.params['pgroup'] and pgrp[
                'time_remaining']:
                pgroup = pgrp
                break
    else:
        for pgrp in array.list_pgroups(pending=True):
            if pgrp['name'] == module.params['pgroup'] and pgrp[
                'time_remaining']:
                pgroup = pgrp
                break
    return pgroup
