





"""simple docstring"""







import unittest

from transformers import is_torch_available
from transformers.testing_utils import require_torch


if is_torch_available():
   import torch

   from transformers.generation import DisjunctiveConstraint




@require_torch
class __magic_name__   (       unittest.TestCase		):
       def 		_lowerCamelCase   (     self	):





         """simple docstring"""


         _lowerCAmelCase	      =					[[1, 2, 4], [1, 2, 3, 4]]
         _lowerCAmelCase	      =					DisjunctiveConstraint(_UpperCAmelCase	)
         self.assertTrue(isinstance(dc.token_ids   ,  _UpperCAmelCase	)	)

         with self.assertRaises(_UpperCAmelCase	):
           DisjunctiveConstraint(torch.LongTensor([[1, 2, 4], [1, 2, 3]]	)	)

         with self.assertRaises(_UpperCAmelCase	):
           DisjunctiveConstraint([torch.LongTensor([1, 2, 4]	), torch.LongTensor([1, 2, 3, 4, 5]	)]	)
       def 		_lowerCamelCase   (     self	):





         """simple docstring"""


         _lowerCAmelCase	      =					[[1, 2], [1, 2, 3, 4]]

         with self.assertRaises(_UpperCAmelCase	):
           DisjunctiveConstraint(_UpperCAmelCase	)  # fails here
       def 		_lowerCamelCase   (     self	):





         """simple docstring"""


         _lowerCAmelCase	      =					[[1, 2, 3], [1, 2, 4]]

         _lowerCAmelCase	      =					DisjunctiveConstraint(_UpperCAmelCase	)

         _lowerCAmelCase      ,   _lowerCAmelCase      ,   _lowerCAmelCase	      =					dc.update(1	)
         _lowerCAmelCase	      =					stepped is True and completed is False and reset is False
         self.assertTrue(_UpperCAmelCase	)
         self.assertTrue(not dc.completed	)
         self.assertTrue(dc.current_seq == [1]	)

         _lowerCAmelCase      ,   _lowerCAmelCase      ,   _lowerCAmelCase	      =					dc.update(2	)
         _lowerCAmelCase	      =					stepped is True and completed is False and reset is False
         self.assertTrue(_UpperCAmelCase	)
         self.assertTrue(not dc.completed	)
         self.assertTrue(dc.current_seq == [1, 2]	)

         _lowerCAmelCase      ,   _lowerCAmelCase      ,   _lowerCAmelCase	      =					dc.update(3	)
         _lowerCAmelCase	      =					stepped is True and completed is True and reset is False
         self.assertTrue(_UpperCAmelCase	)
         self.assertTrue(dc.completed	)  # Completed!
         self.assertTrue(dc.current_seq == [1, 2, 3]	)
       def 		_lowerCamelCase   (     self	):





         """simple docstring"""


         _lowerCAmelCase	      =					[[1, 2, 3], [1, 2, 4, 5], [1, 2, 5]]

         _lowerCAmelCase	      =					DisjunctiveConstraint(_UpperCAmelCase	)

         _lowerCAmelCase      ,   _lowerCAmelCase      ,   _lowerCAmelCase	      =					dc.update(1	)
         self.assertTrue(not dc.completed	)
         self.assertTrue(dc.current_seq == [1]	)

         _lowerCAmelCase      ,   _lowerCAmelCase      ,   _lowerCAmelCase	      =					dc.update(2	)
         self.assertTrue(not dc.completed	)
         self.assertTrue(dc.current_seq == [1, 2]	)

         _lowerCAmelCase      ,   _lowerCAmelCase      ,   _lowerCAmelCase	      =					dc.update(4	)
         self.assertTrue(not dc.completed	)
         self.assertTrue(dc.current_seq == [1, 2, 4]	)

         _lowerCAmelCase      ,   _lowerCAmelCase      ,   _lowerCAmelCase	      =					dc.update(5	)
         self.assertTrue(dc.completed	)  # Completed!
         self.assertTrue(dc.current_seq == [1, 2, 4, 5]	)

         dc.reset()

         _lowerCAmelCase      ,   _lowerCAmelCase      ,   _lowerCAmelCase	      =					dc.update(1	)
         self.assertTrue(not dc.completed	)
         self.assertTrue(dc.remaining() == 3	)
         self.assertTrue(dc.current_seq == [1]	)

         _lowerCAmelCase      ,   _lowerCAmelCase      ,   _lowerCAmelCase	      =					dc.update(2	)
         self.assertTrue(not dc.completed	)
         self.assertTrue(dc.remaining() == 2	)
         self.assertTrue(dc.current_seq == [1, 2]	)

         _lowerCAmelCase      ,   _lowerCAmelCase      ,   _lowerCAmelCase	      =					dc.update(5	)
         self.assertTrue(dc.completed	)  # Completed!
         self.assertTrue(dc.remaining() == 0	)
         self.assertTrue(dc.current_seq == [1, 2, 5]	)









"""simple docstring"""

import math
from datetime import datetime, timedelta






def 		_snake_case	(   _snake_case				:   int				)       ->   datetime:






      '''simple docstring'''


      _A     =  year % 19
      _A     =  year % 4
      _A     =  year % 7
      _A     =  math.floor(year / 1_00				)
      _A     =  math.floor((13 + 8 * leap_day_inhibits) / 25				)
      _A     =  leap_day_inhibits / 4
      _A     =  (
          15 - lunar_orbit_correction + leap_day_inhibits - leap_day_reinstall_number
      ) % 30
      _A     =  (4 + leap_day_inhibits - leap_day_reinstall_number) % 7

      # days to be added to March 21
      _A     =  (19 * metonic_cycle + secular_moon_shift) % 30

      # PHM -> Paschal Full Moon
      _A     =  (
          2 * julian_leap_year
          + 4 * non_leap_year
          + 6 * days_to_add
          + century_starting_point
      ) % 7

      if days_to_add == 29 and days_from_phm_to_sunday == 6:
            return datetime(_snake_case							,    4							,    19				)
      elif days_to_add == 28 and days_from_phm_to_sunday == 6:
            return datetime(_snake_case							,    4							,    18				)
      else:
            return datetime(_snake_case							,    3							,    22				) + timedelta(
                days=int(days_to_add + days_from_phm_to_sunday				)				)


if __name__ == "__main__":
       for year in (1_994, 2_000, 2_010, 2_021, 2_023):
              a							      =     '''will be''' if year > datetime.now().year else '''was'''
              print(F'''Easter in {year} {tense} {gauss_easter(year)}''')

