original_docstring: 
          figure out what slot based on command and args
          
docstring: figure out what slot based on command and args
docstring_tokens: figure out what slot based on command and args
code: def _determine_slot(self, *args):
          """
          figure out what slot based on command and args
          """
          if len(args) <= 1:
              raise RedisClusterException("No way to dispatch this command to Redis Cluster. Missing key.")
          command = args[0]
  
          if command in ['EVAL', 'EVALSHA']:
              numkeys = args[2]
              keys = args[3: 3 + numkeys]
              slots = {self.connection_pool.nodes.keyslot(key) for key in keys}
              if len(slots) != 1:
                  raise RedisClusterException("{0} - all keys must map to the same key slot".format(command))
              return slots.pop()
  
          key = args[1]
  
          return self.connection_pool.nodes.keyslot(key)
code_tokens: def _determine_slot ( self , * args ) : if len ( args ) <= 1 : raise RedisClusterException ( "No way to dispatch this command to Redis Cluster. Missing key." ) command = args [ 0 ] if command in [ 'EVAL' , 'EVALSHA' ] : numkeys = args [ 2 ] keys = args [ 3 : 3 + numkeys ] slots = { self . connection_pool . nodes . keyslot ( key ) for key in keys } if len ( slots ) != 1 : raise RedisClusterException ( "{0} - all keys must map to the same key slot" . format ( command ) ) return slots . pop ( ) key = args [ 1 ] return self . connection_pool . nodes . keyslot ( key )
short_docstring: figure out what slot based on command and args
short_docstring_tokens: figure out what slot based on command and args
comment: """
          figure out what slot based on command and args
          """