def filter_flavors(self, filter_only_private=False):
        flavors = []
        if filter_only_private:
            nova_args = {'is_public': None}
        else:
            nova_args = None
        all_flavors = config.flavors
        for tenant in config.tenants:
            if tenant.get('flavors'):
                all_flavors += [flavor for flavor in tenant['flavors']]
        for flavor in all_flavors:
            if filter_only_private:
                if flavor.get('is_public') is False:
                    flavors.append(flavor['name'])
            elif flavor not in 'is_public' or flavor.get('is_public'):
                flavors.append(flavor['name'])
        return self._get_nova_resources('flavors', flavors, nova_args)
dataset/ETHPy150Open MirantisWorkloadMobility/CloudFerry/cloudferry_devlab/cloudferry_devlab/tests/functional_test.py/FunctionalTest.filter_flavors/swapped operands of `not in`