human
Write me a Python code to datetime get last month number.
assistant
Here is a Python code to datetime get last month number

import datetime

def get_last_month_number(datetime):
    """Get last month number."""
    return datetime.month - 1

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

# Calling the function
print((get_last_month_number(datetime)))

#Example Output
# 0

#Remember to inspect code for bugs.