Python Queue Put Method In Javascript Code