get a class from name within a package

def getClassInPackageFromName(className, pkg):
    """
    get a class from name within a package
    """
    # TODO: more efficiency!
    n = getAvClassNamesInPackage(pkg)
    i = n.index(className)
    c = getAvailableClassesInPackage(pkg)
    return c[i]