Get the namespace of a packageSource:
Namespaces are the environment where all the functions of a package
live. The parent environments of namespaces are the
environments, which contain all the functions imported from other
ns_env(), the name of a package or an environment as a string.
An environment (the current environment by default).
In the latter two cases, the environment ancestry is searched for a namespace with
base::topenv(). If the environment doesn't inherit from a namespace, this is an error.