<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def generate(minimum, maximum, local_random=random.Random()):
 """ Generate a random date. The generated dates are uniformly distributed. Parameters minimum : datetime object maximum : datetime object local_random : random.Random Returns ------- generated_date : datetime object Examples -------- datetime.datetime(2018, 1, 1, 20, 15, 58, 47972) datetime.datetime(2018, 1, 1, 18, 11, 27, 260414) """

    if not (minimum < maximum):
        raise ValueError('{} is not smaller than {}'.format(minimum, maximum))

    # Python 3 allows direct multiplication of timedelta with a float, but
    # Python 2.7 does not. Hence this work-around.
    time_d = maximum - minimum
    time_d_float = time_d.total_seconds()
    time_d_rand = dt.timedelta(seconds=time_d_float * local_random.random())
    generated = minimum + time_d_rand
    return generated