@Override
  @Nullable
  public PyType getType(@NotNull TypeEvalContext context, @NotNull TypeEvalContext.Key key) {
    final boolean qualified = isQualified();

    final PyType providedType = getTypeFromProviders(context);
    if (providedType != null) {
      return providedType;
    }

    if (qualified) {
      final Ref<PyType> qualifiedReferenceType = getQualifiedReferenceType(context);
      if (qualifiedReferenceType != null) {
        return qualifiedReferenceType.get();
      }
    }

    final PyType typeFromTargets = getTypeFromTargets(context);
    if (qualified && typeFromTargets instanceof PyNoneType) {
      return null;
    }
    final Ref<PyType> descriptorType = getDescriptorType(typeFromTargets, context);
    if (descriptorType != null) {
      return descriptorType.get();
    }

    final PyType callableType = getCallableType(context, key);
    if (callableType != null) {
      return callableType;
    }

    return typeFromTargets;
  }
@Override
  @Nullable
  public PyType getType(@NotNull TypeEvalContext context, @NotNull TypeEvalContext.Key key)