def _clear_context():
 keep_context = ('docker.client', 'docker.exec_driver', 'dockerng._pull_status', 'docker.docker_version', 'docker.docker_py_version')
 for key in list(__context__):
  try:
   if (key.startswith('docker.') and (key not in keep_context)):
    __context__.pop(key)
  except AttributeError:
   pass

def _clear_context ( ) : keep_context = ( 'docker.client' , 'docker.exec_driver' , 'dockerng._pull_status' , 'docker.docker_version' , 'docker.docker_py_version' ) for key in list ( __context__ ) : try : if ( key . startswith ( 'docker.' ) and ( key not in keep_context ) ) : __context__ . pop ( key ) except AttributeError : pass
clear variables stored in __context__ .