<human>:  Can you show me a Python function to datetime get last month number.
<bot>: Here is a Python function to datetime get last month number

import datetime

def get_last_month_number(dt):
  """Returns the last month number of a datetime object"""
  return dt.month - 1

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

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

#Example Output
# 0

#Remember to inspect code for bugs.