code: public static List<Object> loadAll(Reader reader) throws IOException {
      Iterable<Object> iterable = getSnakeYaml().loadAll(reader);
      List<Object> list = new ArrayList<Object>();
      for (Object object : iterable) {
        if (object != null) {
          try {
            list.add(modelMapper((Map<String, Object>) object));
          } catch (ClassCastException ex) {
            logger.error("Unexpected exception while casting: " + ex);
          }
        }
      }
  
      return list;
    }
docs: Load list of instantiated API objects from a stream of data. Returns list of concrete typed
  objects (e.g. { V1Pod, V1SERVICE })
  
  <p>Order of API objects in list will be preserved according to order of objects in stream of
  data.
  
  @param reader The stream to load.
  @return List of instantiated of the objects.
  @throws IOException If an error occurs while reading the YAML.