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 ..externals import six
  from ..utils.fixes import signature
  from .deprecation import deprecated
  from ..exceptions import DataConversionWarning
  from ..exceptions import NonBLASDotWarning
  from ..exceptions import NotFittedError
label_desc: Use image node_id 17 for calling a global function with example usage: check_non_negative(X, whom) without return types