code: def get_class_alias(klass):
      
      for k, v in pyamf.ALIAS_TYPES.iteritems():
          for kl in v:
              try:
                  if issubclass(klass, kl):
                      return k
              except TypeError:
                  # not a class
                  if hasattr(kl, '__call__'):
                      if kl(klass) is True:
                          return k
docs: Tries to find a suitable L{pyamf.ClassAlias} subclass for C{klass}.