nodes: 0, module; 1, function_definition; 2, function_name:competitions_list_cli; 3, parameters; 4, block; 5, identifier:self; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, default_parameter; 11, default_parameter; 12, expression_statement; 13, expression_statement; 14, expression_statement; 15, if_statement; 16, identifier:group; 17, None; 18, identifier:category; 19, None; 20, identifier:sort_by; 21, None; 22, identifier:page; 23, integer:1; 24, identifier:search; 25, None; 26, identifier:csv_display; 27, False; 28, comment:""" a wrapper for competitions_list for the client.
  
              Parameters
              ==========
              group: group to filter result to
              category: category to filter result to
              sort_by: how to sort the result, see valid_sort_by for options
              page: the page to return (default is 1)
              search: a search term to use (default is empty string)
              csv_display: if True, print comma separated values
          """; 29, assignment; 30, assignment; 31, identifier:competitions; 32, block; 33, else_clause; 34, identifier:competitions; 35, call; 36, identifier:fields; 37, list; 38, if_statement; 39, block; 40, attribute; 41, argument_list; 42, string; 43, string; 44, string; 45, string; 46, string; 47, string; 48, identifier:csv_display; 49, block; 50, else_clause; 51, expression_statement; 52, identifier:self; 53, identifier:competitions_list; 54, keyword_argument; 55, keyword_argument; 56, keyword_argument; 57, keyword_argument; 58, keyword_argument; 59, string_content:ref; 60, string_content:deadline; 61, string_content:category; 62, string_content:reward; 63, string_content:teamCount; 64, string_content:userHasEntered; 65, expression_statement; 66, block; 67, call; 68, identifier:group; 69, identifier:group; 70, identifier:category; 71, identifier:category; 72, identifier:sort_by; 73, identifier:sort_by; 74, identifier:page; 75, identifier:page; 76, identifier:search; 77, identifier:search; 78, call; 79, expression_statement; 80, identifier:print; 81, argument_list; 82, attribute; 83, argument_list; 84, call; 85, string; 86, identifier:self; 87, identifier:print_csv; 88, identifier:competitions; 89, identifier:fields; 90, attribute; 91, argument_list; 92, string_content:No competitions found; 93, identifier:self; 94, identifier:print_table; 95, identifier:competitions; 96, identifier:fields
code: def competitions_list_cli(self,
                                group=None,
                                category=None,
                                sort_by=None,
                                page=1,
                                search=None,
                                csv_display=False):
          """ a wrapper for competitions_list for the client.
  
              Parameters
              ==========
              group: group to filter result to
              category: category to filter result to
              sort_by: how to sort the result, see valid_sort_by for options
              page: the page to return (default is 1)
              search: a search term to use (default is empty string)
              csv_display: if True, print comma separated values
          """
          competitions = self.competitions_list(
              group=group,
              category=category,
              sort_by=sort_by,
              page=page,
              search=search)
          fields = [
              'ref', 'deadline', 'category', 'reward', 'teamCount',
              'userHasEntered'
          ]
          if competitions:
              if csv_display:
                  self.print_csv(competitions, fields)
              else:
                  self.print_table(competitions, fields)
          else:
              print('No competitions found')