added a set_params_as_attrs method to block_diagram_xml so that
the params dict gets set to attributes of the instance:
setattr(self, key, val)