def METHOD_NAME(frequency, duration, start_time=0, seed=None):
    """
    Generator function for a Homogeneous Poisson train.
    :param frequency: The mean spiking frequency.
    :param duration: Maximum duration.
    :param start_time: Timestamp.
    :param seed: Seed for the random number generator. If None, this will be decided by
      numpy, which chooses the system time.
    :returns: A relative spike time from t=start_time, in seconds (not ms).
    """
    cur_time = start_time
    end_time = duration + start_time
    rangen = np.random.mtrand.RandomState()
    if seed is not None:
        rangen.seed(seed)
    isi = 1.0 / frequency
    while cur_time <= end_time:
        cur_time += isi * rangen.exponential()
        if cur_time > end_time:
            return
        yield cur_time