code: def _check_response(method):
      def check(self):
          return (
              self.response_methods is not None
              and method in self.response_methods
          )
  
      return check
  
imports: import numpy
  from ..base import BaseEstimator, ClassifierMixin
  from ..utils._metadata_requests import RequestMethod
  from .metaestimators import available_if
  from .validation import _check_sample_weight, _num_samples, check_array, check_is_fitted
label_desc: Use image node_id 1 for calling a global function with example usage: _check_response(method) and returns: check, unknown