code: def switch(self, gen_mode:bool=None):
          "Put the model in generator mode if `gen_mode`, in critic mode otherwise."
          self.gen_mode = (not self.gen_mode) if gen_mode is None else gen_modf switch(self, gen_mode:bool=None):
          "Put the model in generator mode if `gen_mode`, in critic mode otherwise."
          self.gen_mode = (not self.gen_mode) if gen_mode is None else gen_mode
docs: Put the model in generator mode if `gen_mode`, in critic mode otherwise.