def datetime_factory(**kwargs):
    second = kwargs.get('second')
    if second is not None:
        f, i = math.modf(second)
        kwargs['second'] = int(i)
        kwargs['microsecond'] = int(f * 1000000)
    try:
        return datetime.datetime(**kwargs)
    except __HOLE__ as e:
        raise DateTimeRangeError(e.args[0])
dataset/ETHPy150Open lugensa/scorched/scorched/dates.py/datetime_factory