nodes: 0, module; 1, function_definition; 2, function_name:get_all_users; 3, parameters; 4, comment:# type: (Optional[Configuration], Any) -> List['User']; 5, block; 6, default_parameter; 7, dictionary_splat_pattern; 8, expression_statement; 9, expression_statement; 10, expression_statement; 11, comment:# only for error message if produced; 12, expression_statement; 13, expression_statement; 14, if_statement; 15, return_statement; 16, identifier:configuration; 17, None; 18, identifier:kwargs; 19, comment:"""Get all users in HDX
  
          Args:
              configuration (Optional[Configuration]): HDX configuration. Defaults to global configuration.
              **kwargs: See below
              q (str): Restrict to names containing a string. Defaults to all users.
              order_by (str): Field by which to sort - any user field or edits (number_of_edits). Defaults to 'name'.
  
          Returns:
              List[User]: List of all users in HDX
          """; 20, assignment; 21, assignment; 22, assignment; 23, assignment; 24, identifier:result; 25, block; 26, else_clause; 27, identifier:users; 28, identifier:user; 29, call; 30, subscript; 31, string; 32, identifier:result; 33, call; 34, identifier:users; 35, call; 36, for_statement; 37, block; 38, identifier:User; 39, argument_list; 40, identifier:user; 41, string; 42, string_content:all users; 43, attribute; 44, argument_list; 45, identifier:list; 46, argument_list; 47, identifier:userdict; 48, identifier:result; 49, block; 50, expression_statement; 51, keyword_argument; 52, string_content:id; 53, identifier:user; 54, identifier:_write_to_hdx; 55, string; 56, identifier:kwargs; 57, string; 58, expression_statement; 59, expression_statement; 60, call; 61, identifier:configuration; 62, identifier:configuration; 63, string_content:list; 64, string_content:id; 65, assignment; 66, call; 67, attribute; 68, argument_list; 69, identifier:user; 70, call; 71, attribute; 72, argument_list; 73, identifier:logger; 74, identifier:debug; 75, identifier:result; 76, identifier:User; 77, argument_list; 78, identifier:users; 79, identifier:append; 80, identifier:user; 81, identifier:userdict; 82, keyword_argument; 83, identifier:configuration; 84, identifier:configuration
code: def get_all_users(configuration=None, **kwargs):
          # type: (Optional[Configuration], Any) -> List['User']
          """Get all users in HDX
  
          Args:
              configuration (Optional[Configuration]): HDX configuration. Defaults to global configuration.
              **kwargs: See below
              q (str): Restrict to names containing a string. Defaults to all users.
              order_by (str): Field by which to sort - any user field or edits (number_of_edits). Defaults to 'name'.
  
          Returns:
              List[User]: List of all users in HDX
          """
          user = User(configuration=configuration)
          user['id'] = 'all users'  # only for error message if produced
          result = user._write_to_hdx('list', kwargs, 'id')
          users = list()
          if result:
              for userdict in result:
                  user = User(userdict, configuration=configuration)
                  users.append(user)
          else:
              logger.debug(result)
          return users