@classmethod
  def _GetInstance(cls):
    op = Operation.GetCurrent()
    lock_tracker = op.context.get('viewpoint_lock_tracker')
    if lock_tracker is None:
      lock_tracker = ViewpointLockTracker()
      op.context['viewpoint_lock_tracker'] = lock_tracker

    return lock_tracker
Closely emulate the interactive Python console.
dataset/ETHPy150Open viewfinderco/viewfinder/backend/db/viewpoint_lock_tracker.py/ViewpointLockTracker._GetInstance--crossover with--dataset/ETHPy150Open babble/babble/include/jython/Lib/code.py/InteractiveConsole.interact