<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_by_id(self, id):
 """ Returns object with _id = id. :param id: Value for ID. If not a string will be coerced to string. :type id: ``string`` :return: Document with id :rtype: ``dict`` """

        return json.loads(self._get(UrlEncoded(str(id))).body.read().decode('utf-8'))