<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getAvailableClassesInPackage(package):
 """ return a list of all classes in the given package whose modules dont begin with '_' """

    l = list(x[1] for x in inspect.getmembers(package, inspect.isclass))

    modules = list(x[1] for x in inspect.getmembers(package, inspect.ismodule))
    for m in modules:
        l.extend(list(x[1] for x in inspect.getmembers(m, inspect.isclass)))
    l = [x for x in l if x.__name__[0] != "_"]
    n = 0
    while n < len(l):
        cls = l[n]
        if not cls.__module__.startswith(package.__name__):
            l.pop(n)
            n -= 1
        n += 1
    return l