def key_kind_n(index):
 @empty_if_none
 def transform_function(key):
  path = key.to_path()
  path_index = (index * 2)
  return unicode(path[path_index])
 return transform_function

def key_kind_n ( index ) : @ empty_if_none def transform_function ( key ) : path = key . to_path ( ) path_index = ( index * 2 ) return unicode ( path [ path_index ] ) return transform_function
pull out the nth key kind from a key which has parents .