<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def isAppStore(s):
 """ Return whether the given store is an application store or not. @param s: A Store. """

    if s.parent is None:
        return False
    substore = s.parent.getItemByID(s.idInParent)
    return s.parent.query(InstalledOffering,
                          InstalledOffering.application == substore
                          ).count() > 0