def getSynopsis(self):
        """
        Returns a string containing a description of these options and how to
        pass them to the executed file.
        """
        executableName = reflect.filenameToModuleName(sys.argv[0])

        if executableName.endswith('.__main__'):
            executableName = '{} -m {}'.format(os.path.basename(sys.executable), executableName.replace('.__main__', ''))

        if self.parent is None:
            default = "Usage: %s%s" % (executableName,
                                       (self.longOpt and " [options]") or '')
        else:
            default = '%s' % ((self.longOpt and "[options]") or '')
        synopsis = getattr(self, "synopsis", default)

        synopsis = synopsis.rstrip()

        if self.parent is not None:
            synopsis = ' '.join((self.parent.getSynopsis(),
                                 self.parent.subCommand, synopsis))
        return synopsis

        Returns a string containing a description of these options and how to
        pass them to the executed file.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/usage.py