docs: def do_notification_list(mc, args):
      '''List notifications for this tenant.'''
      fields = {}
      if args.limit:
          fields['limit'] = args.limit
      if args.offset:
          fields['offset'] = args.offset
      if args.sort_by:
          sort_by = args.sort_by.split(',')
          for field in sort_by:
              field_values = field.lower().split()
              if len(field_values) > 2:
                  print("Invalid sort_by value {}".format(field))
              if field_values[0] not in allowed_notification_sort_by:
                  print("Sort-by field name {} is not in [{}]".format(field_values[0],
                                                                      allowed_notification_sort_by))
                  return
              if len(field_values) > 1 and field_values[1] not in ['asc', 'desc']:
                  print("Invalid value {}, must be asc or desc".format(field_values[1]))
          fields['sort_by'] = args.sort_by
  
      try:
          notification = mc.notifications.list(**fields)
      except osc_exc.ClientException as he:
          raise osc_exc.CommandError(
              'ClientException code=%s message=%s' %
              (he.code, he.message))
      else:
          if args.json:
              print(utils.json_formatter(notification))
              return
          cols = ['name', 'id', 'type', 'address', 'period']
          formatters = {
              'name': lambda x: x['name'],
              'id': lambda x: x['id'],
              'type': lambda x: x['type'],
              'address': lambda x: x['address'],
              'period': lambda x: x['period'],
          }
          if isinstance(notification, list):
  
              utils.print_list(
                  notification,
                  cols,
                  formatters=formatters)
          else:
              notif_list = list()
              notif_list.append(notification)
              utils.print_list(notif_list, cols, formatters=formatters)