Added missing support for pretty parameter. Exception is raised if auto_namespace is False and no/empty ns_dict parameter is passed in