nodes: 0, module; 1, function_definition; 2, function_name:_zadd; 3, parameters; 4, block; 5, identifier:self; 6, identifier:key; 7, identifier:pk; 8, default_parameter; 9, default_parameter; 10, expression_statement; 11, return_statement; 12, identifier:ts; 13, None; 14, identifier:ttl; 15, None; 16, comment:"""Redis lua func to add an event to the corresponding sorted set.
  
          :param key: the key to be stored in redis server
          :param pk: the primary key of event
          :param ts: timestamp of the event, default to redis_server's
           current timestamp
          :param ttl: the expiration time of event since the last update
          """; 17, call; 18, attribute; 19, argument_list; 20, attribute; 21, identifier:eval; 22, attribute; 23, integer:1; 24, identifier:key; 25, boolean_operator; 26, identifier:pk; 27, identifier:self; 28, identifier:r; 29, identifier:self; 30, identifier:LUA_ZADD; 31, identifier:ts; 32, call; 33, attribute; 34, argument_list; 35, identifier:self; 36, identifier:_time
code: def _zadd(self, key, pk, ts=None, ttl=None):
          """Redis lua func to add an event to the corresponding sorted set.
  
          :param key: the key to be stored in redis server
          :param pk: the primary key of event
          :param ts: timestamp of the event, default to redis_server's
           current timestamp
          :param ttl: the expiration time of event since the last update
          """
          return self.r.eval(self.LUA_ZADD, 1, key, ts or self._time(), pk)