<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _sample_oat(problem, N, num_levels=4):
 """Generate trajectories without groups Arguments --------- problem : dict The problem definition N : int The number of samples to generate num_levels : int, default=4 The number of grid levels """

    group_membership = np.asmatrix(np.identity(problem['num_vars'],
                                               dtype=int))

    num_params = group_membership.shape[0]
    sample = np.zeros((N * (num_params + 1), num_params))
    sample = np.array([generate_trajectory(group_membership,
                                           num_levels)
                       for n in range(N)])
    return sample.reshape((N * (num_params + 1), num_params))