def _get_hub():
 global _threadlocal
 try:
  return _threadlocal.hub
 except AttributeError:
  pass

def _get_hub ( ) : global _threadlocal try : return _threadlocal . hub except AttributeError : pass
return the hub for the current thread .