Adding a utility function to parse keys.