<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _binary_sample(image, label, n_samples_per_label, label_count):
 """ Sample `nsamples_per_label` points from the binary mask corresponding to `label` Randomly sample `nsamples_per_label` point form the binary mask corresponding to `label`. Sampling with replacement is used if the required `nsamples_per_label` is larger than the available `label_count` :param image: Input 2D raster label image :type image: uint8 numpy array :param label: Scalar value of label to consider :type label: uint8 :param n_samples_per_label: Number of points to sample form the binary mask :type n_samples_per_label: uint32 :param label_count: Number of points available for `label` :type label_count: uint32 :return: Sampled label value, row index of samples, col index of samples """

        h_idx, w_idx = np.where(image == label)

        rand_idx = np.random.choice(h_idx.size, size=n_samples_per_label, replace=label_count < n_samples_per_label)

        return h_idx[rand_idx], w_idx[rand_idx]