What is the purpose of filing a writ petition?