Subject to the provisions of this Code as to attendance and appearance and to any law for the time being in force, where the Court at any time thinks it necessary to examine any person other than a party to the suit and not called as a witness by a party to the suit, the Court may, of its own motion, cause such person to be summoned as a witness...