code: def evaluating(net):
      """Temporarily switch to evaluation mode."""
      istrain = net.training
      try:
          net.eval()
          yield net
      finally:
          if istrain:
              net.train()
  
label_desc: Use image node_id 1 for calling a global function with example usage: evaluating(net) without return types