def _stringRepresentation(self, stringFunction):
        addr = self.buildAddress()
        pattern = "".join([
           "^",
           "([^\(]+Address)", # class name,
           "\(",       # opening bracket,
           "([^)]+)",  # arguments,
           "\)",       # closing bracket,
           "$"
        ])
        stringValue = stringFunction(addr)
        m = re.match(pattern, stringValue)
        self.assertNotEquals(
            None, m,
            "%s does not match the standard __str__ pattern "
            "ClassName(arg1, arg2, etc)" % (stringValue,))
        self.assertEqual(addr.__class__.__name__, m.group(1))

        args = [x.strip() for x in m.group(2).split(",")]
        self.assertEqual(
            args,
            [argSpec[1] % (getattr(addr, argSpec[0]),) for argSpec in self.addressArgSpec])
Returns the inverse of this function.
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/internet/test/test_address.py/AddressTestCaseMixin._stringRepresentation--crossover with--dataset/ETHPy150Open sympy/sympy/sympy/functions/elementary/trigonometric.py/cot.inverse