

def reverse(self, *args):
    assert (self._path is not None), ('Cannot reverse url regex ' + self.regex.pattern)
    assert (len(args) == self._group_count), 'required number of arguments not found'
    if (not len(args)):
        return self._path
    converted_args = []
    for a in args:
        if (not isinstance(a, (unicode_type, bytes_type))):
            a = str(a)
        converted_args.append(escape.url_escape(utf8(a), plus=False))
    return (self._path % tuple(converted_args))

dataset/ETHPy150Open RobotWebTools/rosbridge_suite/rosbridge_server/src/tornado/web.py URLSpec.reverse/original