code: def check_y(y, link, dist, min_samples=1, verbose=True):
      
      y = np.ravel(y)
  
      y = check_array(y, force_2d=False, min_samples=min_samples, ndim=1,
                      name='y data', verbose=verbose)
  
      with warnings.catch_warnings():
          warnings.simplefilter("ignore")
          
          if np.any(np.isnan(link.link(y, dist))):
              raise ValueError('y data is not in domain of {} link function. ' \
                               'Expected domain: {}, but found {}' \
                               .format(link, get_link_domain(link, dist),
                                       [float('%.2f'%np.min(y)),
                                        float('%.2f'%np.max(y))]))
      return y
docs: tool to ensure that the targets:
      - are in the domain of the link function
      - are numerical
      - have at least min_samples
      - is finite
  
      Parameters
      ----------
      y : array-like
      link : Link object
      dist : Distribution object
      min_samples : int, default: 1
      verbose : bool, default: True
          whether to print warnings
  
      Returns
      -------
      y : array containing validated y-data