input: Write a python function to determine the number of days in a given month, considering leap years.
  assert num_days_in_month(2, 2020) == 29
  assert num_days_in_month(2, 2021) == 28
  assert num_days_in_month(4, 2021) == 30
  assert num_days_in_month(12, 2021) == 31
output: def num_days_in_month(month, year):
      if month == 2:
          if (year % 4 == 0 and year % 100 != 0) or (year % 400 == 0):
              return 29
          else:
              return 28
      elif month in [4, 6, 9, 11]:
          return 30
      else:
          return 31