If any person refuses to attend or testify or produce any writings or things required by any such subpoena, the commission or the masters may petition the superior court for the county in which the hearing is pending for an order compelling such person to attend and testify or produce the writings or things required by the subpoena before the commission or the masters. The court shall order such person to appear before it at a specified time and place and then and there show cause why he has not attended or testified or produced the writings or things as required. A copy of the order shall be served upon him. If it appears to the court that the subpoena was regularly issued, the court shall order such person to appear before the commission or the masters at the time and place fixed in the order and testify or produce the required writings or things. Upon failure to obey the order, such person shall be dealt with as for contempt of court.