def get_pi_id(rc):
    "\n    Gets the database id of the group PI\n\n    Parameters\n    ----------\n    rc: runcontrol object\n      The runcontrol object.  It must contain the 'groups' and 'people'\n      collections in the needed databases\n\n    Returns\n    -------\n    The database '_id' of the group PI\n\n    "
    groupiter = list(all_docs_from_collection(rc.client, 'groups'))
    peoplecoll = all_docs_from_collection(rc.client, 'people')
    pi_ref = [i.get('pi_name') for i in groupiter if (i.get('name').casefold() == rc.groupname.casefold())]
    pi = fuzzy_retrieval(peoplecoll, ['_id', 'aka', 'name'], pi_ref[0])
    return pi.get('_id')
Gets the database id of the group PI

Parameters
----------
rc: runcontrol object
  The runcontrol object.  It must contain the 'groups' and 'people'
  collections in the needed databases

Returns
-------
The database '_id' of the group PI
def get_pi_id(rc):
    "\n    Gets the database id of the group PI\n\n    Parameters\n    ----------\n    rc: runcontrol object\n      The runcontrol object.  It must contain the 'groups' and 'people'\n      collections in the needed databases\n\n    Returns\n    -------\n    The database '_id' of the group PI\n\n    "
    groupiter = list(all_docs_from_collection(rc.client, 'groups'))
    peoplecoll = all_docs_from_collection(rc.client, 'people')
    pi_ref = [i.get('pi_name') for i in groupiter if (i.get('name').casefold() == rc.groupname.casefold())]
    pi = fuzzy_retrieval(peoplecoll, ['_id', 'aka', 'name'], pi_ref[0])
    return pi.get('_id')