nodes: 0, module; 1, function_definition; 2, function_name:run; 3, parameters; 4, block; 5, identifier:self; 6, list_splat_pattern; 7, expression_statement; 8, expression_statement; 9, expression_statement; 10, if_statement; 11, return_statement; 12, identifier:args; 13, comment:"""Get and set configuration parameters.
  
          This command gets or sets parameter values from the user configuration
          file. On Linux systems, configuration will be stored in the file
          '~/.sortinghat'.
          """; 14, assignment; 15, assignment; 16, comparison_operator:params.action == 'get'; 17, block; 18, elif_clause; 19, else_clause; 20, identifier:code; 21, identifier:params; 22, call; 23, identifier:config_file; 24, call; 25, attribute; 26, string; 27, expression_statement; 28, comparison_operator:params.action == 'set'; 29, block; 30, block; 31, attribute; 32, argument_list; 33, attribute; 34, argument_list; 35, identifier:params; 36, identifier:action; 37, string_content:get; 38, assignment; 39, attribute; 40, string; 41, expression_statement; 42, raise_statement; 43, attribute; 44, identifier:parse_args; 45, identifier:args; 46, attribute; 47, identifier:expanduser; 48, string; 49, identifier:code; 50, call; 51, identifier:params; 52, identifier:action; 53, string_content:set; 54, assignment; 55, call; 56, identifier:self; 57, identifier:parser; 58, identifier:os; 59, identifier:path; 60, string_content:~/.sortinghat; 61, attribute; 62, argument_list; 63, identifier:code; 64, call; 65, identifier:RuntimeError; 66, argument_list; 67, identifier:self; 68, identifier:get; 69, attribute; 70, identifier:config_file; 71, attribute; 72, argument_list; 73, string:"Not get or set action given"; 74, identifier:params; 75, identifier:parameter; 76, identifier:self; 77, identifier:set; 78, attribute; 79, attribute; 80, identifier:config_file; 81, identifier:params; 82, identifier:parameter; 83, identifier:params; 84, identifier:value
code: def run(self, *args):
          """Get and set configuration parameters.
  
          This command gets or sets parameter values from the user configuration
          file. On Linux systems, configuration will be stored in the file
          '~/.sortinghat'.
          """
          params = self.parser.parse_args(args)
  
          config_file = os.path.expanduser('~/.sortinghat')
  
          if params.action == 'get':
              code = self.get(params.parameter, config_file)
          elif params.action == 'set':
              code = self.set(params.parameter, params.value, config_file)
          else:
              raise RuntimeError("Not get or set action given")
  
          return code