def _is_namespace_visible(context, namespace, status=None):
    """Return True if the namespace is visible in this context."""
    if context.is_admin:
        return True
    if namespace['owner'] is None:
        return True
    if 'visibility' in namespace:
        if namespace['visibility'] == 'public':
            return True
    if context.owner is not None:
        if context.owner == namespace['owner']:
            return True
    return False
