add debug python method