'Constructor.
Args:
arguments: Arguments to the filter.
value_expander: A callable that will be used to expand values for the
objects passed to this filter. Implementations expanders are provided by
subclassing ValueExpander.
Raises:
Error: If the given value_expander is not a subclass of ValueExpander'

def __init__(self, arguments=None, value_expander=None):

    self.value_expander = None
    self.value_expander_cls = value_expander
    if self.value_expander_cls:
        if (not issubclass(self.value_expander_cls, ValueExpander)):
            raise Error(('%s    is    not    a    valid    value    expander' % self.value_expander_cls))
        self.value_expander = self.value_expander_cls()
    self.args = (arguments or [])
