def METHOD_NAME(self, cfg):
    Permission = get_sdk(self.cli_ctx, ResourceType.MGMT_AUTHORIZATION, 'Permission', mod='models',
                         operation_group='role_definitions')
    permission = Permission(actions=cfg.get('actions', None),
                            not_actions=cfg.get('notActions', None))
    if not self.old_api:
        permission.data_actions = cfg.get('dataActions', None)
        permission.not_data_actions = cfg.get('notDataActions', None)
    return permission