# Check for method The equivalent of PHP's `method_exists`. See [this stackoverflow](https://stackoverflow.com/questions/5268404/what-is-the-fastest-way-to-check-if-a-class-has-a-function-defined) ```py invert_op = getattr(self, "invert_op", None) if callable(invert_op): invert_op(self.path.parent_op) ```