Install a context property.

        A context property is a factory function whos return value will be
        available as a property named `name` on `Context` objects passing
        through this mapper. The result will be cached unless `cached` is
        False.

        The factory function will be called without arguments, or with the
        context object if it requests an argument named 'ctx'.

def add_ctx_property(self, name, fn, cached=True):
        """Install a context property.

        A context property is a factory function whos return value will be
        available as a property named `name` on `Context` objects passing
        through this mapper. The result will be cached unless `cached` is
        False.

        The factory function will be called without arguments, or with the
        context object if it requests an argument named 'ctx'.
        """
        if name in [item[0] for item in self._ctx_properties]:
             raise InvalidArgumentError("A context property name '%s' already exists." % name)
        self._ctx_properties.append([name, (fn, cached)])