In the documentation, the prepare_cmds are associated with the partition and it is possible to add them in the config file.
It should be possible to define something like self.prepare_cmds in the initialization method of any test like the self.prerun_cmds property.
This can be useful in some circumstances.
If somehow it is already feasible, the documentation should provide a clear example.