<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get(self, object_type, object_id):
 """List all tags a given object has."""

        if object_id == 0:
            return json_success(json.dumps([]))

        query = db.session.query(TaggedObject).filter(and_(
            TaggedObject.object_type == object_type,
            TaggedObject.object_id == object_id))
        tags = [{'id': obj.tag.id, 'name': obj.tag.name} for obj in query]
        return json_success(json.dumps(tags))