@Nullable
  private static PyType dropSelfForQualifiedMethod(@Nullable PyType type,
                                                   @NotNull TypeEvalContext context,
                                                   @NotNull PyReferenceExpression anchor) {
    if (type instanceof PyFunctionType && context.maySwitchToAST(anchor) && anchor.getQualifier() != null) {
      return ((PyFunctionType)type).dropSelf(context);
    }

    return type;
  }
@Nullable
  private static PyType dropSelfForQualifiedMethod(@Nullable PyType type,
                                                   @NotNull TypeEvalContext context,
                                                   @NotNull PyReferenceExpression anchor)