def _namespace_default():
ns_path = '<STR_LIT>'<EOL>if os.path.exists(ns_path):<EOL><INDENT>with open(ns_path) as f:<EOL><INDENT>return f.read().strip()<EOL><DEDENT><DEDENT>return '<STR_LIT:default>'<EOL>
Get current namespace if running in a k8s cluster

If not in a k8s cluster with service accounts enabled, default to
'default'

Taken from https://github.com/jupyterhub/kubespawner/blob/master/kubespawner/spawner.py#L125