<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def permitted_actions(self, obj=None):
 """Determine permitted actions for a given object pattern. """

        return [a for a in Action.registered
                if self.allow(a, obj(str(a)) if obj is not None else None)]