code: def check_non_negative(X, whom):
      """
      Check if there is any negative value in an array.
      Parameters
      ----------
      X : array-like or sparse matrix
          Input data.
      whom : string
          Who passed X to this function.
      """
      X = X.data if sp.issparse(X) else X
      if (X < 0).any():
          raise ValueError(
              "Negative values in data passed to %s" % whom
          )
  
imports: import warnings
  import numbers
  import numpy
  import scipy.sparse
  from ..None import six
  from ...utils.exceptions import NotFittedError, NonBLASDotWarning, DataConversionWarning
label_desc: Use image node_id 17 for calling a global function with example usage: check_non_negative(X, whom) without return types