Retrosynthesis Prediction with Local Template Retrieval