code: def _time_ym_delta(timestamp, delta, months):
      
      timestamp = list(time.localtime(timestamp))
      timestamp[int(months)] += delta
      return time.mktime(timestamp)
docs: Helper to add a year or month delta to a timestamp.