nodes: 0, module; 1, function_definition; 2, function_name:zadd; 3, parameters; 4, block; 5, identifier:self; 6, identifier:key; 7, identifier:score; 8, identifier:member; 9, list_splat_pattern; 10, default_parameter; 11, expression_statement; 12, if_statement; 13, if_statement; 14, expression_statement; 15, if_statement; 16, expression_statement; 17, if_statement; 18, expression_statement; 19, if_statement; 20, return_statement; 21, identifier:pairs; 22, identifier:exist; 23, None; 24, comment:"""Add one or more members to a sorted set or update its score.
  
          :raises TypeError: score not int or float
          :raises TypeError: length of pairs is not even number
          """; 25, not_operator; 26, block; 27, comparison_operator:len(pairs) % 2 != 0; 28, block; 29, assignment; 30, call; 31, block; 32, assignment; 33, comparison_operator:exist is self.ZSET_IF_EXIST; 34, block; 35, elif_clause; 36, call; 37, identifier:pairs; 38, block; 39, call; 40, call; 41, raise_statement; 42, binary_operator:len(pairs) % 2; 43, integer:0; 44, raise_statement; 45, identifier:scores; 46, generator_expression; 47, identifier:any; 48, generator_expression; 49, raise_statement; 50, identifier:args; 51, list; 52, identifier:exist; 53, attribute; 54, expression_statement; 55, comparison_operator:exist is self.ZSET_IF_NOT_EXIST; 56, block; 57, attribute; 58, argument_list; 59, expression_statement; 60, attribute; 61, argument_list; 62, identifier:isinstance; 63, argument_list; 64, call; 65, call; 66, integer:2; 67, call; 68, identifier:item; 69, for_in_clause; 70, if_clause; 71, not_operator; 72, for_in_clause; 73, call; 74, identifier:self; 75, identifier:ZSET_IF_EXIST; 76, call; 77, identifier:exist; 78, attribute; 79, expression_statement; 80, identifier:args; 81, identifier:extend; 82, list; 83, call; 84, identifier:self; 85, identifier:execute; 86, string; 87, identifier:key; 88, list_splat; 89, identifier:score; 90, tuple; 91, identifier:TypeError; 92, argument_list; 93, identifier:len; 94, argument_list; 95, identifier:TypeError; 96, argument_list; 97, pattern_list; 98, call; 99, comparison_operator:i % 2 == 0; 100, call; 101, identifier:s; 102, identifier:scores; 103, identifier:TypeError; 104, argument_list; 105, attribute; 106, argument_list; 107, identifier:self; 108, identifier:ZSET_IF_NOT_EXIST; 109, call; 110, identifier:score; 111, identifier:member; 112, attribute; 113, argument_list; 114, string_content:ZADD; 115, identifier:args; 116, identifier:int; 117, identifier:float; 118, string:"score argument must be int or float"; 119, identifier:pairs; 120, string:"length of pairs must be even number"; 121, identifier:i; 122, identifier:item; 123, identifier:enumerate; 124, argument_list; 125, binary_operator:i % 2; 126, integer:0; 127, identifier:isinstance; 128, argument_list; 129, string:"all scores must be int or float"; 130, identifier:args; 131, identifier:append; 132, string; 133, attribute; 134, argument_list; 135, identifier:args; 136, identifier:extend; 137, identifier:pairs; 138, identifier:pairs; 139, identifier:i; 140, integer:2; 141, identifier:s; 142, tuple; 143, string_content:XX; 144, identifier:args; 145, identifier:append; 146, string; 147, identifier:int; 148, identifier:float; 149, string_content:NX
code: def zadd(self, key, score, member, *pairs, exist=None):
          """Add one or more members to a sorted set or update its score.
  
          :raises TypeError: score not int or float
          :raises TypeError: length of pairs is not even number
          """
          if not isinstance(score, (int, float)):
              raise TypeError("score argument must be int or float")
          if len(pairs) % 2 != 0:
              raise TypeError("length of pairs must be even number")
  
          scores = (item for i, item in enumerate(pairs) if i % 2 == 0)
          if any(not isinstance(s, (int, float)) for s in scores):
              raise TypeError("all scores must be int or float")
  
          args = []
          if exist is self.ZSET_IF_EXIST:
              args.append(b'XX')
          elif exist is self.ZSET_IF_NOT_EXIST:
              args.append(b'NX')
  
          args.extend([score, member])
          if pairs:
              args.extend(pairs)
          return self.execute(b'ZADD', key, *args)