<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_catalogs(portal):
 """Returns the catalogs from the site """

    res = []
    for object in portal.objectValues():
        if ICatalogTool.providedBy(object):
            res.append(object)
        elif IZCatalog.providedBy(object):
            res.append(object)
    res.sort()
    return res