@staticmethod
def factory(value, transform=False):
    """A class for computing the absolute (magnitude) of another term.

        This is a static factory method, that is meant to instantiate a
        :class:`~sumpf._data._filters._base._terms._unary.Absolute` instance. But
        due to optimizations, it might return an instance of another subclass of
        :class:`~sumpf._data._filters._base._terms._base.Term`, if that is simpler
        and more efficient.

        :param value: a term
        :param transform: True, if a lowpass-to-highpass-transformation shall be
                          performed, False otherwise
        :returns: an instance of a subclass of :class:`~sumpf._data._filters._base._terms._base.Term`
        """
    if transform:
        return abs(value.invert_transform())
    else:
        return abs(value)
