@Nullable
  private PyType getBoundPromotedToClassObjectTypesIfNeeded() {
    if (myIsDefinition) {
      return PyTypeUtil.toStream(myBound)
        .map(t -> t instanceof PyInstantiableType ? ((PyInstantiableType<?>)t).toClass() : t)
        .collect(PyTypeUtil.toUnion());
    }
    return myBound;
  }
@Nullable
  private PyType getBoundPromotedToClassObjectTypesIfNeeded()