import collections


def _get_named_block_list(m):
    """Get `{name: module}` dictionary for inverted residual blocks."""
    blocks = list(m.features.named_children())
    blocks = blocks[1:-2]
    return collections.OrderedDict([
        ('features.{}'.format(name), block) for name, block in blocks
    ])