human
Write me a Python function to add milliseconds to datetime.
assistant
Here is a Python function to add milliseconds to datetime

import datetime

def add_milliseconds(dt, ms):
    """Add milliseconds to datetime."""
    return dt + datetime.timedelta(milliseconds=ms)

# Enter the datetime
dt = datetime.datetime(2019, 1, 1, 1, 1, 1)

# Enter the milliseconds
ms = 1000

# Calling the function
print((add_milliseconds(dt, ms)))

#Example Output
# 2019-01-01 01:01:02

#Remember to inspect code for bugs.