'Returns a `ParameterDict` containing this `Block` and all of its
children\'s Parameters.'

def collect_params(self):

    ret = ParameterDict(self._params.prefix)
    ret.update(self.params)
    for cld in self._children:
        ret.update(cld.collect_params())
    return ret
