def GetGeneratorByLanguage(language_or_generator):
  """Return the appropriate generator for this language.

  Args:
    language_or_generator: (str) the language for which to return a generator,
        or the name of a specific generator.

  Raises:
    ValueError: If provided language isn't supported.

  Returns:
    The appropriate code generator object (which may be None).
  """

  try:
    return _ALL_GENERATORS[language_or_generator]
  except __HOLE__:
    raise ValueError('Unsupported language: %s' % language_or_generator)
dataset/ETHPy150Open google/apis-client-generator/src/googleapis/codegen/generator_lookup.py/GetGeneratorByLanguage