'Validate label and its shape.'

def _check_valid_label(self, label):

    if ((len(label.shape) != 2) or (label.shape[1] < 5)):
        msg = ('Label    with    shape    (1+,    5+)    required,    %s    received.' % str(label))
        raise RuntimeError(msg)
    valid_label = np.where(np.logical_and((label[:, 0] >= 0), (label[:, 3] > label[:, 1]), (label[:, 4] > label[:, 2])))[0]
    if (valid_label.size < 1):
        raise RuntimeError('Invalid    label    occurs.')
