def get_class_alias(klass):
    """
    Tries to find a suitable L{pyamf.ClassAlias} subclass for C{klass}.
    """
    for k, v in pyamf.ALIAS_TYPES.iteritems():
        for kl in v:
            try:
                if issubclass(klass, kl):
                    return k
            except __HOLE__:
                # not a class
                if hasattr(kl, '__call__'):
                    if kl(klass) is True:
                        return k
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/PyAMF-0.6.1/pyamf/util/__init__.py/get_class_alias