def shared_cluster_internal():
 global _shared_cluster
 if (_shared_cluster is None):
  _shared_cluster = MiniHadoopCluster()
  _shared_cluster.start()
  atexit.register(_shared_cluster.stop)
 return _shared_cluster

def shared_cluster_internal ( ) : global _shared_cluster if ( _shared_cluster is None ) : _shared_cluster = MiniHadoopCluster ( ) _shared_cluster . start ( ) atexit . register ( _shared_cluster . stop ) return _shared_cluster
manages _shared_cluster .