def item_resolver(loan_pid):
    'Resolve an Item given a Loan PID.'
    Loan = current_circulation.loan_record_cls
    loan = Loan.get_record_by_pid(loan_pid)
    if (not loan.get('item_pid')):
        return {}
    try:
        item = resolve_item_from_loan(loan['item_pid'])
    except PIDDeletedError:
        item = {}
    else:
        item = pick(item, 'barcode', 'description', 'document_pid', 'medium', 'pid')
    return item
Resolve an Item given a Loan PID.
def item_resolver(loan_pid):
    
    Loan = current_circulation.loan_record_cls
    loan = Loan.get_record_by_pid(loan_pid)
    if (not loan.get('item_pid')):
        return {}
    try:
        item = resolve_item_from_loan(loan['item_pid'])
    except PIDDeletedError:
        item = {}
    else:
        item = pick(item, 'barcode', 'description', 'document_pid', 'medium', 'pid')
    return item