Returns the value of an attribute of the value, or the result of a call to a function.

        Arguments
        ---------
        value : ?
            A value to solve in combination with the given filter.
        filter_ : dataql.resource.Filter
            An instance of ``Filter`` to solve with the given value.

        Returns
        -------
        Depending on the source, the filter may ask for an attribute of the value, or for the
        result of a call to a standalone function taking the value as first argument.
        This method returns this attribute or result.

        Example
        -------

        >>> from dataql.solvers.registry import Registry
        >>> registry = Registry()
        >>> from datetime import date
        >>> registry.register(date, ['day', 'strftime'])
        >>> solver = FilterSolver(registry)
        >>> solver.solve(date(2015, 6, 1), Filter(name='day'))
        1
        >>> from dataql.resources import PosArg
        >>> solver.solve(date(2015, 6, 1), Filter(name='strftime', args=[PosArg('%F')]))
        '2015-06-01'

def solve(self, value, filter_):
        """Returns the value of an attribute of the value, or the result of a call to a function.

        Arguments
        ---------
        value : ?
            A value to solve in combination with the given filter.
        filter_ : dataql.resource.Filter
            An instance of ``Filter`` to solve with the given value.

        Returns
        -------
        Depending on the source, the filter may ask for an attribute of the value, or for the
        result of a call to a standalone function taking the value as first argument.
        This method returns this attribute or result.

        Example
        -------

        >>> from dataql.solvers.registry import Registry
        >>> registry = Registry()
        >>> from datetime import date
        >>> registry.register(date, ['day', 'strftime'])
        >>> solver = FilterSolver(registry)
        >>> solver.solve(date(2015, 6, 1), Filter(name='day'))
        1
        >>> from dataql.resources import PosArg
        >>> solver.solve(date(2015, 6, 1), Filter(name='strftime', args=[PosArg('%F')]))
        '2015-06-01'

        """

        args, kwargs = filter_.get_args_and_kwargs()
        source = self.registry[value]
        return source.solve(value, filter_.name, args, kwargs)