<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def exec_commands(self, action, c_name, run_cmds, **kwargs):
 """ Runs a single command inside a container. :param action: Action configuration. :type action: dockermap.map.runner.ActionConfig :param c_name: Container name. :type c_name: unicode | str :param run_cmds: Commands to run. :type run_cmds: list[dockermap.map.input.ExecCommand] :return: List of exec command return values (e.g. containing the command id), if applicable, or ``None`` if either no commands have been run or no values have been returned from the API. :rtype: list[dict] | NoneType """

        client = action.client
        exec_results = []
        for run_cmd in run_cmds:
            cmd = run_cmd.cmd
            cmd_user = run_cmd.user
            log.debug("Creating exec command in container %s with user %s: %s.", c_name, cmd_user, cmd)
            ec_kwargs = self.get_exec_create_kwargs(action, c_name, cmd, cmd_user)
            create_result = client.exec_create(**ec_kwargs)
            if create_result:
                e_id = create_result['Id']
                log.debug("Starting exec command with id %s.", e_id)
                es_kwargs = self.get_exec_start_kwargs(action, c_name, e_id)
                client.exec_start(**es_kwargs)
                exec_results.append(create_result)
            else:
                log.debug("Exec command was created, but did not return an id. Assuming that it has been started.")
        if exec_results:
            return exec_results
        return None