code: def get_platform_by_name(self, name, for_target=None):
      
      if not name:
        return self.default_platform
      if name not in self.platforms_by_name:
        raise self.UndefinedJvmPlatform(for_target, name, self.platforms_by_name)
      return self.platforms_by_name[name]
docs: Finds the platform with the given name.
  
      If the name is empty or None, returns the default platform.
      If not platform with the given name is defined, raises an error.
      :param str name: name of the platform.
      :param JvmTarget for_target: optionally specified target we're looking up the platform for.
        Only used in error message generation.
      :return: The jvm platform object.
      :rtype: JvmPlatformSettings