def get_namespace_parent(namespace):
    """
    From a provided namespace, return it's parent or None if there's no parent.

    >>> get_namespace_parent('org.foo.bar')
    'org.foo'
    >>> get_namespace_parent('org') is None
    True

    :param str namespace: The namespace to namespace.
    :return: The parent namespace
    :rtype: str
    """
    return namespace.rsplit(".", 1)[0] if "." in namespace else None