def put_tlp(results, target_log_prob):
    """Puts a target log prob into a results structure"""
    if isinstance(results, list):
        results[0] = put_tlp(results[0], target_log_prob)
        return results
    else:
        accepted_results = results.accepted_results._replace(
            target_log_prob=target_log_prob
        )
        return results._replace(accepted_results=accepted_results)