'Returns the list of kinds for this app.
There can be 3 possible cases using namespaces:
a.) No namespace specified and Datastore has only default namespace ->
Query GlobalStat and KindStat.
b.) No namespace specified but Datastore has multiple namespace ->
Query NamespaceGlobalStat and NamespaceKindStat.
c.) Namespace specified and Datastore has multiple namespaces ->
Query NamespaceGlobalStat and NamespaceKindStat.
Returns:
A list of kinds.'

def GetSchemaKinds(self):

    namespaces = False
    if (namespace_manager.get_namespace() or (stats.NamespaceStat.all().count() > 1)):
        namespaces = True
    if namespaces:
        global_kind = stats.NamespaceGlobalStat
    else:
        global_kind = stats.GlobalStat
    kinds_kind = (stats.NamespaceKindStat if namespaces else stats.KindStat)
    global_stat = global_kind.all().get()
    if (not global_stat):
        raise KindStatError()
    timestamp = global_stat.timestamp
    kind_stat = kinds_kind.all().filter('timestamp    =', timestamp).fetch(1000)
    kind_list = [stat.kind_name for stat in kind_stat if (stat.kind_name and (not stat.kind_name.startswith('__')))]
    return list(set(kind_list))
