def METHOD_NAME(self, FILTER, allow_no_filter=True, discover_file=None):
    """
    Get FileFilter instance or None
    If `FILTER` evaluates to True, it is passed to FileFilter and the
    resulting object is returned.
    If `FILTER` evaluates to False, None is returned if allow_no_filter
    evaluates to True, otherwise a ValueError is raised.
    `discover_file` is ignored and only used in the TUI version of this
    method (see ..tui.mixin.select_file).
    """
    if FILTER:
        from ...client import FileFilter
        return FileFilter(FILTER)
    else:
        if allow_no_filter:
            return None
        else:
            raise ValueError('No torrent specified')