Alkaloids are a diverse group of naturally occurring chemical compounds that are known to have various…