docs: public static void writeToList(CodedOutputStream out, int order, FieldType type, List list, boolean packed)
              throws IOException {
          if (list == null || list.isEmpty()) {
              return;
          }
  
          if (packed) {
              out.writeUInt32NoTag(makeTag(order, WireFormat.WIRETYPE_LENGTH_DELIMITED));
              out.writeUInt32NoTag(computeListSize(order, list, type, false, null, packed, true)); 
          }
  
          for (Object object : list) {
              if (object == null) {
                  throw new NullPointerException("List can not include Null value.");
              }
              writeObject(out, order, type, object, true, !packed);
  
          }
  
      }