<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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