code: def get_rule_table(rules):
      
      table = formatting.Table(['Id', 'KeyName'], "Rules")
      for rule in rules:
          table.add_row([rule['id'], rule['keyName']])
      return table
docs: Formats output from get_all_rules and returns a table.