Experts have developed a method for desensitising dogs to fireworks.