code: def get_notification_commands(self, notifways, n_type, command_name=False):
          
          res = []
  
          for notifway_id in self.notificationways:
              notifway = notifways[notifway_id]
              res.extend(notifway.get_notification_commands(n_type))
  
          # Update inner notification commands property with command name or command
          if command_name:
              setattr(self, n_type + '_notification_commands', [c.get_name() for c in res])
          else:
              setattr(self, n_type + '_notification_commands', res)
  
          return res
docs: Get notification commands for object type
  
          :param notifways: list of alignak.objects.NotificationWay objects
          :type notifways: NotificationWays
          :param n_type: object type (host or service)
          :type n_type: string
          :param command_name: True to update the inner property with the name of the command,
                               False to update with the Command objects list
          :type command_name: bool
          :return: command list
          :rtype: list[alignak.objects.command.Command]