code: public static <T> List<T> toList(Iterable<T> iterable) {
          List<T> list = null;
  
          if (iterable != null) {
              list = new ArrayList<>();
              for (T elem : iterable) {
                  list.add(elem);
              }
          }
  
          return list;
      }
docs: Creates a new list from the iterable elements.
  
  @param iterable the iterable
  @return a list with the iterable elements