<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pendingResultsFor( self, ps ):
 """Retrieve a list of all pending results associated with the given parameters. :param ps: the parameters :returns: a list of pending result job ids, which may be empty"""

        k = self._parametersAsIndex(ps)
        if k in self._results.keys():
            # filter out pending job ids, which can be anything except dicts
            return [ j for j in self._results[k] if not isinstance(j, dict) ]
        else:
            return []