def METHOD_NAME(self, new_resource, stack_name, resources):
    props = new_resource["Properties"]
    client = connect_to(
        aws_access_key_id=self.account_id, region_name=self.region_name
    ).stepfunctions
    sm_arn = self.props.get("stateMachineArn")
    if not sm_arn:
        self.state = self.fetch_state(stack_name=stack_name, resources=resources)
        sm_arn = self.state["stateMachineArn"]
    kwargs = {
        "stateMachineArn": sm_arn,
        "definition": props["DefinitionString"],
    }
    return client.update_state_machine(**kwargs)