def id_to_path(pk):
 pk = unicode(pk)
 path = [pk[(-1)]]
 if (len(pk) >= 2):
  path.append(pk[(-2):])
 else:
  path.append(pk)
 path.append(pk)
 return os.path.join(*path)

def id_to_path ( pk ) : pk = unicode ( pk ) path = [ pk [ ( - 1 ) ] ] if ( len ( pk ) >= 2 ) : path . append ( pk [ ( - 2 ) : ] ) else : path . append ( pk ) path . append ( pk ) return os . path . join ( * path )
generate a path from an id .