<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, **query):
 """ Gets the results of query, with optional parameters sort, limit, skip, and fields. :param query: Optional parameters. Valid options are sort, limit, skip, and fields :type query: ``dict`` :return: Array of documents retrieved by query. :rtype: ``array`` """

        return json.loads(self._get('', **query).body.read().decode('utf-8'))