pyang-eculler: refactor export code