code: def switch_training_phase(
      self, training_phase: TrainingPhase = TrainingPhase.BACKWARD
  ):
      old_training_phase = self._training_phase
      try:
          self._training_phase = training_phase
          yield
      finally:
          self._training_phase = old_training_phase
  
imports: from contextlib import contextmanager
  from enum import Enum
  from functools import partial
  from typing import List
  import torch
  from colossalai.legacy.zero.gemini.tensor_utils import alloc_storage, free_storage
  from colossalai.tensor.param_op_hook import ColoParamOpHook
  from colossalai.zero.gemini.memory_tracer import MemStats, SyncCudaMemoryMonitor
label_desc: Use image node_id 11 for calling the ParamMemTracerHook obj's underlying member method code with example usage: obj.switch_training_phase(training_phase) without return types