The municipal judge shall have full power and authority to compel the attendance of parties as witnesses at the municipal court and, for this purpose, may fine for contempt any such amount or penalty as may be prescribed by ordinance. The power is also granted to the municipal judge to take and receive of parties and witnesses such bond or bonds as he or she may deem necessary to secure the attendance of parties as witnesses and to forfeit said bond or bonds in the same manner as such bonds are now forfeited in the superior courts of this state.