code: ProtoFile retainAll(Schema schema, MarkSet markSet) {
      ImmutableList.Builder<Type> retainedTypes = ImmutableList.builder();
      for (Type type : types) {
        Type retainedType = type.retainAll(schema, markSet);
        if (retainedType != null) {
          retainedTypes.add(retainedType);
        }
      }
  
      ImmutableList.Builder<Service> retainedServices = ImmutableList.builder();
      for (Service service : services) {
        Service retainedService = service.retainAll(schema, markSet);
        if (retainedService != null) {
          retainedServices.add(retainedService);
        }
      }
  
      ProtoFile result = new ProtoFile(location, imports, publicImports, packageName,
          retainedTypes.build(), retainedServices.build(), extendList,
          options.retainAll(schema, markSet), syntax);
      result.javaPackage = javaPackage;
      return result;
    }
docs: Returns a new proto file that omits types and services not in {@code identifiers}.