'Report the privacy level for an object.
Hide all tests with the exception of L{twisted.test.proto_helpers}.
param obj: Object for which the privacy is reported.
type obj: C{model.Documentable}
rtype: C{model.PrivacyClass} member'

def privacyClass(self, documentable):

    if (documentable.fullName() == 'twisted.test'):
        return model.PrivacyClass.VISIBLE
    current = documentable
    while current:
        if (current.fullName() == 'twisted.test.proto_helpers'):
            return model.PrivacyClass.VISIBLE
        if (isinstance(current, model.Package) and (current.name == 'test')):
            return model.PrivacyClass.HIDDEN
        current = current.parent
    return super(TwistedSystem, self).privacyClass(documentable)
