'adds block and its descendants out to depth to descendent_map
Depth specifies the number of levels of descendants to return
(0 => this usage only, 1 => this usage and its children, etc...)
A depth of None returns all descendants'

def descendants(self, block_map, block_id, depth, descendent_map):

    if (block_id not in block_map):
        return descendent_map
    if (block_id not in descendent_map):
        descendent_map[block_id] = block_map[block_id]
    if ((depth is None) or (depth > 0)):
        depth = ((depth - 1) if (depth is not None) else None)
        for child in descendent_map[block_id].fields.get('children', []):
            descendent_map = self.descendants(block_map, child, depth, descendent_map)
    return descendent_map
