<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _query(self, action, qobj):
 """ Form query to enumerate category """

        title = self.params.get('title')
        pageid = self.params.get('pageid')

        if action == 'random':
            return qobj.random(namespace=14)
        elif action == 'category':
            return qobj.category(title, pageid, self._continue_params())