def get(language_model_type):
  """Returns a language model instance of the specified type."""
  if language_model_type == "left2right":
    language_model = Left2RightLanguageModel()
  else:
    raise ValueError("Unknown LM type: %s. The type must be one of %s."
                     % (language_model_type, str(U.LM_TYPES)))
  return language_model
Returns a language model instance of the specified type.
language/labs/consistent_zero_shot_nmt/modules/language_models.py