Thanks, Lorenzo.
I'm so sorry, I misdescribed the problem, what I can't get the return value correctly is the entityType. When I am at the entity of Folder, Shot, or Milestone, the entityType return value is always a task. I try to use
_context = self.session.get('Context',selection['entityId'])
but the return is None.
I can query the folders with
session.query("Folder")
but I can't catch them from
event['data']['selection']