


'''simple docstring'''







def _UpperCamelCase       (     __A    )							->		int:


      '''simple docstring'''



      UpperCamelCase__										=				0
      while num > 0:
            digit_sum += num % 10
            num //= 10
      return digit_sum







def _UpperCamelCase       (     __A = 100    )							->		int:


      '''simple docstring'''



      UpperCamelCase__										=				1
      UpperCamelCase__										=				2

      for i in range(2      ,			max_n + 1    ):
            UpperCamelCase__										=				pre_numerator
            UpperCamelCase__										=				2 * i // 3 if i % 3 == 0 else 1
            UpperCamelCase__										=				cur_numerator
            UpperCamelCase__										=				e_cont * pre_numerator + temp

      return sum_digits(__A    )


if __name__ == "__main__":
  print(F"""{solution() = }""")






import argparse
import json

from tqdm import tqdm



def lowerCamelCase  (   ):
    '''simple docstring'''







    __UpperCamelCase     :Tuple			  =		argparse.ArgumentParser()

    # Required parameters
    parser.add_argument(
        '''--src_path'''  ,			type=SCREAMING_SNAKE_CASE  ,			default='''biencoder-nq-dev.json'''  ,			help='''Path to raw DPR training data'''  ,			)
    parser.add_argument(
        '''--evaluation_set'''  ,			type=SCREAMING_SNAKE_CASE  ,			help='''where to store parsed evaluation_set file'''  ,			)
    parser.add_argument(
        '''--gold_data_path'''  ,			type=SCREAMING_SNAKE_CASE  ,			help='''where to store parsed gold_data_path file'''  ,			)
    __UpperCamelCase     :str			  =		parser.parse_args()

    with open(args.src_path  ,			'''r'''	) as src_file, open(args.evaluation_set  ,			'''w'''	) as eval_file, open(
        args.gold_data_path  ,			'''w'''	) as gold_file:
        __UpperCamelCase     :List[str]			  =		json.load(SCREAMING_SNAKE_CASE	)
        for dpr_record in tqdm(SCREAMING_SNAKE_CASE	):
            __UpperCamelCase     :List[str]			  =		dpr_record['''question''']
            __UpperCamelCase     :Tuple			  =		[context['''title'''] for context in dpr_record['''positive_ctxs''']]
            eval_file.write(question + '''\n'''	)
            gold_file.write('''\t'''.join(SCREAMING_SNAKE_CASE	) + '''\n'''	)


if __name__ == "__main__":
    main()





