beam_opt.py#