<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def delete_namespace(self, namespace):
 """ Delete the specified CIM namespace in the WBEM server and update this WBEMServer object to reflect the removed namespace there. The specified namespace must be empty (i.e. must not contain any classes, instances, or qualifier types. This method attempts the following approaches for deleting the namespace, in order, until an approach succeeds: 1. Issuing the `DeleteInstance` operation using the CIM class representing namespaces ('PG_Namespace' for OpenPegasus, and 'CIM_Namespace' otherwise), against the Interop namespace. This approach is typically supported in WBEM servers that support the creation of CIM namespaces. This approach is similar to the approach described in :term:`DSP0200`. The approach described in the WBEM Server profile (:term:`DSP1092`) via deleting the `CIM_WBEMServerNamespace` instance is not implemented because that would also delete any classes, instances, and qualifier types in the namespace. Deleting namespaces using the `__Namespace` pseudo-class has been deprecated already in DSP0200 1.1.0 (released in 01/2003), and pywbem does not implement that approach. Parameters: namespace (:term:`string`):
 CIM namespace name. Must not be `None`. The namespace may contain leading and a trailing slash, both of which will be ignored. Returns: :term:`unicode string`: The specified CIM namespace name in its standard format (i.e. without leading or trailing slash characters). Raises: Exceptions raised by :class:`~pywbem.WBEMConnection`. ModelError: An issue with the model implemented by the WBEM server. CIMError: CIM_ERR_NOT_FOUND, Specified namespace does not exist. CIMError: CIM_ERR_NAMESPACE_NOT_EMPTY, Specified namespace is not empty. Additional CIM errors. """


        std_namespace = _ensure_unicode(namespace.strip('/'))

        # Use approach 1: DeleteInstance of CIM class for namespaces

        # Refresh the list of namespaces in this object to make sure
        # it is up to date.
        self._determine_namespaces()

        if std_namespace not in self.namespaces:
            raise CIMError(
                CIM_ERR_NOT_FOUND,
                _format("Specified namespace does not exist: {0!A}",
                        std_namespace),
                conn_id=self.conn.conn_id)

        ns_path = None
        for p in self.namespace_paths:
            if p.keybindings['Name'] == std_namespace:
                ns_path = p
        assert ns_path is not None

        # Ensure the namespace is empty. We do not check for instances, because
        # classes are a prerequisite for instances, so if no classes exist,
        # no instances will exist.
        # WBEM servers that do not support class operations (e.g. SFCB) will
        # raise a CIMError with status CIM_ERR_NOT_SUPPORTED.
        class_paths = self.conn.EnumerateClassNames(
            namespace=std_namespace, ClassName=None, DeepInheritance=False)
        quals = self.conn.EnumerateQualifiers(namespace=std_namespace)
        if class_paths or quals:
            raise CIMError(
                CIM_ERR_NAMESPACE_NOT_EMPTY,
                _format("Specified namespace {0!A} is not empty; it contains "
                        "{1} top-level classes and {2} qualifier types",
                        std_namespace, len(class_paths), len(quals)),
                conn_id=self.conn.conn_id)

        self.conn.DeleteInstance(ns_path)

        # Refresh the list of namespaces in this object to remove the one
        # we just deleted.
        self._determine_namespaces()

        return std_namespace