import numpy as np def beam_search(step_fn, bos_id, eos_id, beam_width, max_len, length_penalty=0.0): raise NotImplementedError