<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def apseudo(Ss, ipar, sigma):
 """ draw a bootstrap sample of Ss """

#
    Is = random.randint(0, len(Ss) - 1, size=len(Ss))  # draw N random integers
    #Ss = np.array(Ss)
    if not ipar: # ipar == 0:
        BSs = Ss[Is]
    else:  # need to recreate measurement - then do the parametric stuffr
        A, B = design(6)  # get the design matrix for 6 measurementsa
        K, BSs = [], []
        for k in range(len(Ss)):
            K.append(np.dot(A, Ss[k][0:6]))
        Pars = np.random.normal(K, sigma)
        for k in range(len(Ss)):
            BSs.append(np.dot(B, Pars[k]))
    return np.array(BSs)