def METHOD_NAME(Pid):
    '''抓取用户信息的通用包，成功返回包含id, name, credit的字典'''
    try:
        participant = Pid
        if not isinstance(Pid, Participant):
            participant = get_participant(participant, raise_except=True)
    except Exception as e:
        return {'statusInfo': {'message': '学号不存在', 'detail': str(e)}}
    return {
        'id': participant.Sid_id,
        'name': participant.name,
        'credit': participant.credit,
    }