private @Nullable PsiElement resolvePossibleRegexpCall(@NotNull PyCallExpression call) {
    final PyExpression callee = call.getCallee();

    if (callee instanceof PyReferenceExpression referenceExpression && canBeRegexpCall(callee)) {
      final TypeEvalContext context = TypeEvalContext.codeAnalysis(call.getProject(), call.getContainingFile());
      return referenceExpression.getReference(PyResolveContext.defaultContext(context)).resolve();
    }

    return null;
  }
private @Nullable PsiElement resolvePossibleRegexpCall(@NotNull PyCallExpression call)