<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def filter(stream_spec, filter_name, *args, **kwargs):
 """Apply custom filter. ``filter_`` is normally used by higher-level filter functions such as ``hflip``, but if a filter implementation is missing from ``fmpeg-python``, you can call ``filter_`` directly to have ``fmpeg-python`` pass the filter name and arguments to ffmpeg verbatim. Args: stream_spec: a Stream, list of Streams, or label-to-Stream dictionary mapping filter_name: ffmpeg filter name, e.g. `colorchannelmixer` *args: list of args to pass to ffmpeg verbatim **kwargs: list of keyword-args to pass to ffmpeg verbatim The function name is suffixed with ``_`` in order avoid confusion with the standard python ``filter`` function. Example: ``ffmpeg.input('in.mp4').filter('hflip').output('out.mp4').run()`` """

    return filter_multi_output(stream_spec, filter_name, *args, **kwargs).stream()