def _get_bar_type(ptype, pid_ref):
    """helper method for _get_bar_yz_arrays"""
    if ptype in ['PBAR', 'PBEAM']:
        bar_type = 'bar'
    elif ptype in ['PBARL', 'PBEAML']:
        bar_type = pid_ref.Type
    elif ptype == 'PBCOMP':
        bar_type = 'pbcomp'
    else:
        raise NotImplementedError(pid_ref)
    return bar_type
