docstr: Checks if the value passed is a non-negative integer which may or may not be equal to zero
docstr_tok: ["Checks","if","the","value","passed","is","a","non-negative","integer","which","may","or","may","not","be","equal","to","zero"]
code: def _is_nonnegative(self, value, variable, strict=True):
      """Checks if the value passed is a non-negative integer which may or may not be equal to zero"""
  
      if not isinstance(value, (int, np.integer)):
          raise ValueError("%s should be an integer" % (variable))
  
      if strict:
          isnegative = value > 0
      else:
          isnegative = value >= 0
  
      if not isnegative:
          raise ValueError("%s should be non-negative" % (variable))
      return isnegative
  
imports: import warnings
  import numpy
  from sklearn.base import BaseEstimator, ClusterMixin
  from sklearn.exceptions import ConvergenceWarning
  from sklearn.metrics.pairwise import pairwise_distances, pairwise_distances_argmin
  from sklearn.utils import check_array
  from sklearn.utils.validation import check_is_fitted
label_desc: Use image node_id 3 for calling the KMedoids obj's underlying member method code with example usage: obj._is_nonnegative(value, variable, strict) and returns: isnegative