Opioids are a class of drugs which includes some illegal drugs as well as the pain killers or pain relievers…