请创建一个根据给定年份和月份返回该月有多少天的函数。
year = 2022, month = 2
def get_month_days(year: int, month: int) -> int:
    if month == 2:
        if year % 400 == 0 or (year % 4 == 0 and year % 100 != 0):
            return 29
        else:
            return 28
    elif month in {4, 6, 9, 11}:
        return 30
    else:
        return 31

print(get_month_days(2022, 2)) # output: 28