writerfilter: convert factory_ns to Python

Change-Id: I64996b3f96f51ba80ade636c13a2919410672a27