[Machine] The Messenger of Allah ﷺ entered a grave at night and a lantern was brought to him. He took it from the direction of the Qibla and made four takbirs (saying Allahu Akbar) over it. He then said, "May Allah have mercy on you, if you are indeed a follower of the Quran." This narration is weak in its chain of narrators and it has also been narrated from another weak chain of narrators from Ibn Mas'ud. As mentioned by Imam Shafi'i, who is most famous in the land of Hijaz, he takes it from the later generations and this makes it more likely to be followed. And Allah knows best.
دَخَلَ رَسُولُ اللهِ ﷺ قَبْرًا لَيْلًا وَأُسْرِجَ لَهُ سِرَاجٌ وَأَخَذَهُ مِنْ قِبَلِ الْقِبْلَةِ وَكَبَّرَ عَلَيْهِ أَرْبَعًا ثُمَّ قَالَ رَحِمَكَ اللهُ إِنْ كُنْتَ لَأَوَّاهًا تَالِيًا لِلْقُرْآنِ هَذَا إِسْنَادٌ ضَعِيفٌ وَرُوِيَ مِنْ وَجْهٍ آخَرَ ضَعِيفٍ عَنِ ابْنِ مَسْعُودٍ وَالَّذِي ذَكَرَهُ الشَّافِعِيُّ أَشْهَرُ فِي أَرْضِ الْحِجَازِ يَأْخُذُهُ الْخَلَفُ عَنِ السَّلَفِ فَهُوَ أَوْلَى بِالِاتِّبَاعِ وَاللهُ أَعْلَمُ