It’s not mating if I’m not mistaken. I have seen many documentaries about snakes, they are actually fighting in order to mate a female cobra, It’s a rules in fighting to do not use biting or inserting venom.
It looks like dancing but actually one snake trying to let down the other snake’s head without using their venom.
Actually they are not dancing, they are fighting for either area or mate, the one who forces the head of his opponent to touch the ground wins. But the amazing thing is they should not bite, Biting Is prohibited.
It is said that, they are mating and they are happy and that should not be seen by anyone as it will curse the person who sees them in their happy state, my grandma tells these stories.