def get_namespace_leaf(namespace):
    """
    From a provided namespace, return it's leaf.

    >>> get_namespace_leaf('foo.bar')
    'bar'
    >>> get_namespace_leaf('foo')
    'foo'

    :param namespace:
    :return:
    """
    return namespace.rsplit(".", 1)[-1]