def METHOD_NAME(cls, loan_pid):
    """Anonymize all logs corresponding to the given loan.
    :param loan_pid: Loan PID.
    """
    for log in cls.get_logs_by_record_pid(loan_pid):
        record = log.to_dict()
        record['loan']['patron']['name'] = 'anonymized'
        record['loan']['patron']['pid'] = 'anonymized'
        cls.update(log.meta.id, log['date'], record)