class_docstr: Allowed patching a stream into the logger.
  Used for capturing and logging stdin and stderr when running in development mode pseudo worker.
class_docstr_tok: ["Allowed","patching","a","stream","into","the","logger",".","Used","for","capturing","and","logging","stdin","and","stderr","when","running","in","development","mode","pseudo","worker","."]
code: def disconnect(self, logger=None):
      # disconnect the logger only if it was registered
      if not logger or self._log == logger:
          self.connect(None)
  
imports: import logging
  import sys
  from time import time
  from ..binding.frameworks import _patched_call
  from ..config import running_remotely, config, DEBUG_SIMULATE_REMOTE_TASK
  from ..utilities.process.mp import ForkSafeRLock
label_desc: Use image node_id 4 for calling the PrintPatchLogger obj's underlying member method code with example usage: obj.disconnect(logger) without return types