def get_snap_statuses(r):
    """
    Description: Helper function for pandas apply() function. Retrieves the associatedInterpretationSnapshots
        from the provisionalVariant column and parses out the statuses in a format expected in the vciStatus
        column.

    Args:
        r (pandas row): A row in a pandas dataframe of GVC Interpretation item type
    
    Retval:
        retval (dict): A summary of snapshot statuses for the interp in a similar format to:
            {'i': 0, 'a': 1, 'p': 1}
    """
    tmp = []
    if 'provisionalVariant' in r:
      if 'associatedInterpretationSnapshots' in r['provisionalVariant']:
        for snap in r.provisionalVariant.get('associatedInterpretationSnapshots', []):
            tmp.append(snap['approvalStatus'])
      
    retval = {}
    if len(tmp) == 0:
        retval['i'] = 1
    if 'Approved' in tmp:
        retval['a'] = 1
    if 'Provisioned' in tmp:
        retval['p'] = 1
    return retval