def BotToPlatform(bot_platform):
  """Takes a bot platform value and returns a platform string."""
  if bot_platform.startswith('win'):
    return 'windows'
  elif bot_platform.startswith('linux'):
    return 'linux'
  elif bot_platform.startswith('mac'):
    return 'mac'
  else:
    raise ValueError('Unknown platform %s' % bot_platform)