def dispatch(self, parameterName, value):
        """
        When called in dispatch, do the coerce for C{value} and save the
        returned value.
        """
        if value is None:
            raise UsageError("Parameter '%s' requires an argument."
                             % (parameterName,))
        try:
            value = self.coerce(value)
        except ValueError as e:
            raise UsageError("Parameter type enforcement failed: %s" % (e,))

        self.options.opts[parameterName] = value

        When called in dispatch, do the coerce for C{value} and save the
        returned value.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/usage.py