@Override
  public void serialize(@NotNull final PyClassStub pyClassStub, @NotNull final StubOutputStream dataStream) throws IOException {
    dataStream.writeName(pyClassStub.getName());

    final Map<QualifiedName, QualifiedName> superClasses = pyClassStub.getSuperClasses();
    dataStream.writeByte(superClasses.size());
    for (Map.Entry<QualifiedName, QualifiedName> entry : superClasses.entrySet()) {
      QualifiedName.serialize(entry.getKey(), dataStream);
      QualifiedName.serialize(entry.getValue(), dataStream);
    }

    final List<String> baseClassesText = pyClassStub.getSuperClassesText();
    dataStream.writeByte(baseClassesText.size());
    for (String text : baseClassesText) {
      dataStream.writeName(text);
    }

    QualifiedName.serialize(pyClassStub.getMetaClass(), dataStream);

    PyFileElementType.writeNullableList(dataStream, pyClassStub.getSlots());

    final String docString = pyClassStub.getDocString();
    dataStream.writeUTFFast(docString != null ? docString : "");
    dataStream.writeName(pyClassStub.getDeprecationMessage());

    serializeCustomStub(pyClassStub.getCustomStub(PyCustomClassStub.class), dataStream);
  }
@Override
  public void serialize(@NotNull final PyClassStub pyClassStub, @NotNull final StubOutputStream dataStream)