def METHOD_NAME(self):
    Source = namedtuple('Source', 'typology, weight')
    s1 = Source('point', 1)
    s2 = Source('point', 1)
    s3 = Source('area', 2)
    s4 = Source('area', 4)
    s5 = Source('area', 4)
    blocks = list(
        block_splitter([s1, s2, s3, s4, s5], max_weight=6,
                       weight=attrgetter('weight'),
                       key=attrgetter('typology')))
    self.assertEqual(list(map(len, blocks)), [2, 2, 1])
    self.assertEqual([b.weight for b in blocks], [2, 6, 4])
    blocks = list(
        split_in_blocks([s1, s2, s3, s4, s5], hint=6,
                        weight=attrgetter('weight'),
                        key=attrgetter('typology')))
    self.assertEqual(list(map(len, blocks)), [1, 1, 1, 2])
    self.assertEqual([b.weight for b in blocks], [2, 4, 4, 2])