def write(self):
        """
        Generate the completion function and write it to the output file
        @return: L{None}
        """
        gen = ZshArgumentsGenerator(self.options, self.cmdName, self.file)
        gen.extraActions.insert(0, SubcommandAction())
        gen.write()

        gen = ZshArgumentsGenerator(self.subOptions, self.cmdName, self.file)
        gen.write()

        Generate the completion function and write it to the output file
        @return: L{None}
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/_shellcomp.py