code: def auto_forward(auto=True):
      
      global __auto_forward_state
      prev = __auto_forward_state
      __auto_forward_state = auto
      yield
      __auto_forward_state = prev
docs: Context for dynamic graph execution mode.
  
      Args:
          auto (bool): Whether forward computation is executed during a
              computation graph construction.
  
      Returns: bool