def METHOD_NAME(self):
    class F(Filter):
        type = 'xyz'
    p = self.load_policy({
        'name': 'xyz',
        'resource': 'ec2',
        'filters': [
            {'and': [{'or': []}]},
            {'not': []},
            {'or': []}
        ]})
    m = p.resource_manager
    self.assertEqual(
        [n is not None and n.type or n for n in m.iter_filters(
            block_end=True)],
        ['and', 'or', None, None, 'not', None, 'or', None])
    f = F({}, m)
    m.filters.append(f)
    self.assertEqual(f.get_block_operator(), 'and')
    f = F({}, m)
    m.filters[0].filters[0].filters.append(f)
    self.assertEqual(f.get_block_operator(), 'or')
    f = F({}, m)
    m.filters[1].filters.append(f)
    self.assertEqual(f.get_block_operator(), 'not')