def _new_platform_settings(system, release):
  if system == 'Darwin':
    return _OsxPlatformSettings()
  if system == 'Linux':
    return _LinuxPlatformSettings()
  if system == 'Windows' and release == 'XP':
    return _WindowsXpPlatformSettings()
  if system == 'Windows':
    return _WindowsPlatformSettings()
  if system == 'FreeBSD':
    return _FreeBSDPlatformSettings()
  raise NotImplementedError('Sorry %s %s is not supported.' % (system, release))


# Create one instance of the platform-specific settings and
# make the functions available at the module-level.
Make a new instance of PlatformSettings for the current system.
dataset/ETHPy150Open chromium/web-page-replay/platformsettings.py/_new_platform_settings