<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _sim_WA(trace, PAZ, seedresp, water_level, velocity=False):
 """ Remove the instrument response from a trace and simulate a Wood-Anderson. Returns a de-meaned, de-trended, Wood Anderson simulated trace in its place. Works in-place on data and will destroy your original data, copy the trace before giving it to this function! :type trace: obspy.core.trace.Trace :param trace: A standard obspy trace, generally should be given without pre-filtering, if given with pre-filtering for use with amplitude determination for magnitudes you will need to worry about how you cope with the response of this filter yourself. :type PAZ: dict :param PAZ: Dictionary containing lists of poles and zeros, the gain and the sensitivity. If unset will expect seedresp. :type seedresp: dict :param seedresp: Seed response information - if unset will expect PAZ. :type water_level: int :param water_level: Water level for the simulation. :type velocity: bool :param velocity: Whether to return a velocity trace or not - velocity is non-standard for Wood-Anderson instruments, but institutes that use seiscomp3 or Antelope require picks in velocity. :returns: Trace of Wood-Anderson simulated data :rtype: :class:`obspy.core.trace.Trace` """

    # Note Wood anderson sensitivity is 2080 as per Uhrhammer & Collins 1990
    PAZ_WA = {'poles': [-6.283 + 4.7124j, -6.283 - 4.7124j],
              'zeros': [0 + 0j], 'gain': 1.0, 'sensitivity': 2080}
    if velocity:
        PAZ_WA['zeros'] = [0 + 0j, 0 + 0j]
    # De-trend data
    trace.detrend('simple')
    # Simulate Wood Anderson
    if PAZ:
        trace.data = seis_sim(trace.data, trace.stats.sampling_rate,
                              paz_remove=PAZ, paz_simulate=PAZ_WA,
                              water_level=water_level,
                              remove_sensitivity=True)
    elif seedresp:
        trace.data = seis_sim(trace.data, trace.stats.sampling_rate,
                              paz_remove=None, paz_simulate=PAZ_WA,
                              water_level=water_level, seedresp=seedresp)
    else:
        UserWarning('No response given to remove, will just simulate WA')
        trace.data = seis_sim(trace.data, trace.stats.sampling_rate,
                              paz_remove=None, paz_simulate=PAZ_WA,
                              water_level=water_level)
    return trace