Return a morfessor model for `lang` and of version `version`

  Args:
    lang (string): language code.
    version (string): version of the parameters to be used.

def load_morfessor_model(lang="en", version="2"):
  """Return a morfessor model for `lang` and of version `version`

  Args:
    lang (string): language code.
    version (string): version of the parameters to be used.
  """
  src_dir = "morph{}".format(version)
  p = locate_resource(src_dir, lang)
  file_handler = _open(p)
  tmp_file_ = NamedTemporaryFile(delete=False)
  tmp_file_.write(file_handler.read())
  tmp_file_.close()
  io = morfessor.MorfessorIO()
  model = io.read_any_model(tmp_file_.name)
  os.remove(tmp_file_.name)
  return model