Take a raw dictionary representation and adapt it back to a proper mongo document dictionary
        :param dict obj: The object to adapt
        :return: a mongo document with complex types for storage in mongo
        :rtype: dict

def _dictionary_to_cursor(self, obj):
        """
        Take a raw dictionary representation and adapt it back to a proper mongo document dictionary
        :param dict obj: The object to adapt
        :return: a mongo document with complex types for storage in mongo
        :rtype: dict
        """
        if obj.get("id"):
            obj["_id"] = ObjectId(obj.get("id"))
            del obj["id"]

        if isinstance(obj.get("_id"), str):
            obj["_id"] = ObjectId(obj.get("_id"))

        return obj