Counting necklaces with a fixed number of each bead

I want to count the number of necklaces, with $n$ beads in total, where the alphabet of beads is $\{1,\ldots,k\}$, and where the number of beads with color $i$ is $n_i$. For example, if $n=4$, and $n_1 = n_2 = 2$, the following necklaces are the only possible
$$1122$$
$$1212$$

I have been able to find formulas for different variations of the problem, but not this one. If there is no nice formula, a generating function is always a nice compromise.

Solutions Collecting From Web of "Counting necklaces with a fixed number of each bead"