def censor(content_fragment, context):
    """
        Censors the content fragment appropriately and returns the censored value.

        :param content_fragment: The fragment being censored.
        :param context: The object that this content fragment should be censored
            with regard to. For example, the fragment's container or composite
            object that will hold the fragment.
        :return: The censored content fragment, if any censoring was done to it.
            May also raise a :class:`ValueError` if censoring is not
            allowed and the content should be thrown away.
        """
