Write a function named 'tyre_in_stack' that takes three parameters: 'tyre_shop' (representing a tyre shop), 'tyre_diameter' (representing the diameter of a tyre), and 'stack_name' (representing the name of a stack). The function should perform the following operations:
1. Define a function named 'move_to_temp' that takes two parameters: 'stack_from' (representing the stack from which a tyre is to be moved) and 'temp_stack' (representing a temporary stack). If there is a tyre in 'tyre_shop[stack_from]', move the top tyre from 'tyre_shop[stack_from]' to 'tyre_shop[temp_stack]' and return True. Otherwise, return False.
2. Define a function named 'find_tyre' that takes four parameters: 'stack_name' (representing the name of a stack), 'tyre_diameter' (representing the diameter of a tyre), 'temp_stack_a' (representing the name of a temporary stack A), and 'temp_stack_b' (representing the name of a temporary stack B). If there is no tyre in 'tyre_shop[stack_name]', return False. Otherwise, check the diameter of the top tyre in 'tyre_shop[stack_name]'. If it is equal to 'tyre_diameter', return True. If it is less than 'tyre_diameter', move the tyre from 'stack_name' to 'temp_stack_a' using the 'move_to_temp' function, recursively call 'find_tyre' with the updated parameters, move the tyre back from 'temp_stack_a' to 'stack_name', and return the result of the recursive call. If the top tyre diameter is greater than 'tyre_diameter', return False.
3. Call the 'find_tyre' function with the initial parameters 'stack_name', 'tyre_diameter', 'MOVEA' (as the name of temporary stack A), and 'MOVEB' (as the name of temporary stack B). While there are tyres in 'tyre_shop[MOVEA]', move them back to 'stack_name' using the 'move_back' function. While there are tyres in 'tyre_shop[MOVEB]', move them back to 'stack_name' using the 'move_back_to_stack' function. Finally, return the result of the 'find_tyre' function.
What is the purpose of the 'tyre_in_stack' function?