Human: test a datetime object. Assistant: 
Here is a Python code to test a datetime object

import datetime

def is_valid_datetime(dt):
    """
    >>> is_valid_datetime(datetime.datetime(2019, 1, 1, 1, 1, 1))
    True
    >>> is_valid_datetime(datetime.datetime(2019, 1, 1, 1, 1, 1, 1))
    False
    """
    return dt.tzinfo is not None

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

# Calling the function
print((is_valid_datetime(dt)))

#Example Output
# False

#Remember to inspect code for bugs.