class_docstr: Protocol is the base class that other protocols in TF Encrypted will extend.
  
  Do not directly instantiate this class.  You should use a subclass instead,
  such as :class:`~tf_encrypted.protocol.protocol.SecureNN`
  or :class:`~tf_encrypted.protocol.protocol.Pond`
code: def __enter__(self) -> "Protocol":
      self.last_protocol = tfe.get_protocol()
      tfe.set_protocol(self)
      return self
  
imports: import functools
  from abc import ABC
  from types import TracebackType
  from typing import Any
  from typing import Callable
  from typing import Optional
  import tensorflow
  import tf_encrypted
  from ..config import get_config
  from ..tensor.factory import AbstractTensor
label_desc: Use image node_id 1 for calling the Protocol obj's underlying member method code with example usage: obj.__enter__() and returns: self