def delete_value(self, name, local=True, scope=SYSTEM_SCOPE):
        """
        Delete the provided key.

        By default, value is deleted from a namespace local to the pack/class. If you want to
        delete a global value, pass local=False to this method.

        :param name: Name of the key to delete.
        :type name: ``str``

        :param local: Delete a value in a namespace local to the pack/class. Defaults to True.
        :type: local: ``bool``

        :param scope: Scope under which item is saved. Defaults to system scope.
        :type: local: ``str``

        :return: ``True`` on success, ``False`` otherwise.
        :rtype: ``bool``
        """
        if scope != SYSTEM_SCOPE:
            raise ValueError("Scope %s is unsupported." % scope)

        name = self._get_full_key_name(name=name, local=local)

        client = self.get_api_client()

        instance = KeyValuePair()
        instance.id = name
        instance.name = name

        self._logger.debug("Deleting value from the datastore (name=%s)", name)

        try:
            params = {"scope": scope}
            client.keys.delete(instance=instance, params=params)
        except Exception as e:
            self._logger.exception(
                "Exception deleting value from datastore (name=%s): %s", name, e
            )
            return False

        return True

        Delete the provided key.

        By default, value is deleted from a namespace local to the pack/class. If you want to
        delete a global value, pass local=False to this method.

        :param name: Name of the key to delete.
        :type name: ``str``

        :param local: Delete a value in a namespace local to the pack/class. Defaults to True.
        :type: local: ``bool``

        :param scope: Scope under which item is saved. Defaults to system scope.
        :type: local: ``str``

        :return: ``True`` on success, ``False`` otherwise.
        :rtype: ``bool``
        
st2common/st2common/services/datastore.py