class_docstr: Starts a long-running subprocess and restarts it on matched events.
  
  The command parameter is a list of command arguments, such as
  ['bin/myserver', '-c', 'etc/myconfig.ini'].
  
  Call start() after creating the Trick. Call stop() when stopping
  the process.
class_docstr_tok: ["Starts","a","long-running","subprocess","and","restarts","it","on","matched","events",".","The","command","parameter","is","a","list","of","command","arguments",",","such","as","[","'bin\/myserver","'",",","'-c","'",",","'etc\/myconfig.ini","'","]",".","Call","start","(",")","after","creating","the","Trick",".","Call","stop","(",")","when","stopping","the","process","."]
code: def on_any_event(self, event):
      self.stop()
      self.start()
  
imports: import os
  import signal
  import subprocess
  import time
  from wandb_watchdog.utils import echo, has_attribute
  from wandb_watchdog.events import PatternMatchingEventHandler
label_desc: Use image node_id 4 for calling the AutoRestartTrick obj's underlying member method code with example usage: obj.on_any_event(event) without return types