def generate_open_shard_key():
 open_shards = get_open_shards()
 shard_id = random.choice(open_shards)
 key = (shard_id << 48)
 return key

def generate_open_shard_key ( ) : open_shards = get_open_shards ( ) shard_id = random . choice ( open_shards ) key = ( shard_id << 48 ) return key
return the key that can be passed into session_scope() for an open shard .