def replace_in_body(self, text_to_replace, placeholder):
        for obj in ('request', 'response'):
            body = self.data[obj]['body']
            old_style = hasattr(body, 'replace')
            if not old_style:
                body = body.get('string', '')

            if body in text_to_replace:
                body = body.replace(text_to_replace, placeholder)
            if old_style:
                self.data[obj]['body'] = body
            else:
                self.data[obj]['body']['string'] = body
dataset/ETHPy150Open sigmavirus24/betamax/betamax/cassette/interaction.py/Interaction.replace_in_body/swapped operands of `in`