def get_context_attribute(self, request, context_name, namespace_name = None):
    """
    Retrieves the value of the context attribute with the
    provided name.

    In case no attribute is found a none value is returned.

    :type request: Request
    :param request: The request to be used.
    :type context_name: String
    :param context_name: The name of the of the context attribute
    to retrieve the value.
    :type namespace_name: String
    :param namespace_name: The name of the namespace to be used
    for the context (session) variable to be retrieved.
    :rtype: Object
    :return:  The value of the requested context attribute.
    """

    # retrieves the context defaulting to a new and empty map
    # in case an invalid session attribute is returned
    context = self.get_session_attribute(request, "_context", namespace_name)
    if context == None: context = {}

    # returns the retrieves attribute value, defaulting to none
    # in case it's not present in the context map
    return context.get(context_name, None)