def join_action_pointer(action, pos):
    """Join action label and pointer value.

    Args:
        action (str): action label without pointer
        pos (int or str): pointer value

    Return:
        action_complete (str): complete action label
    """
    if action.startswith('>LA') or action.startswith('>RA'):
        action_parts = action.split('(')
        assert len(action_parts) == 2
        assert int(pos) >= 0
        action_complete = f'{action_parts[0]}({pos},{action_parts[1]}'
    else:
        action_complete = action
    return action_complete