def METHOD_NAME(pulse_durations,phases, positions,sample):
    '''
        generate waveform with varoius pulses
        Input:
            pulse_durations - 1d array of pulse lengths (in s)
            phases - 1d array of phases of the pulses (in rad)
            positions - 1d array of the pulse position, measured in s from the end of the pulse to the end of the wfm (smallest distance)
        NOTE that all input arrays have to be of the same length!
            length - length of the wfm (in s), also known as exc_T
        Output:
            (complex) float array of samples
    '''
    if not(len(pulse_durations)==len(phases) and len(phases)==len(positions)):
        raise ValueError("Input Arrays do not have the same size: pulse_durations: %i, phases: %i, positions: %i"%
            (len(pulse_durations),len(phases),len(positions)))
    #if(pulses*(delay+pi2_x_pulse)-delay > length): logging.error(__name__ + ' : x-pulses do not fit into waveform')
    phases=np.exp(1j*np.array(phases))
    wfm = np.zeros_like(gwf.square(0, sample),dtype=np.complex)    
    for i in range(len(pulse_durations)):
        wfm += gwf.square(pulse_durations[i], sample, position= length-positions[i])*phases[i]
    return wfm