<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_formatoptions(cls, include_bases=True):
 """ Iterator over formatoptions This class method returns an iterator that contains all the formatoptions descriptors that are in this class and that are defined in the base classes Notes ----- There is absolutely no need to call this method besides the plotter initialization, since all formatoptions are in the plotter itself. Just type:: to get the formatoptions. See Also -------- _format_keys"""

        def base_fmtos(base):
            return filter(
                lambda key: isinstance(getattr(cls, key), Formatoption),
                getattr(base, '_get_formatoptions', empty)(False))

        def empty(*args, **kwargs):
            return list()
        fmtos = (attr for attr, obj in six.iteritems(cls.__dict__)
                 if isinstance(obj, Formatoption))
        if not include_bases:
            return fmtos
        return unique_everseen(chain(fmtos, *map(base_fmtos, cls.__mro__)))