class_docstr: A boto based Active Record class based on convention of CRUD operations.
docstr: Search for objects with the SageMaker API.
docstr_tok: ["Search","for","objects","with","the","SageMaker","API","."]
code: def _search(
      cls,
      search_resource,
      search_item_factory,
      boto_next_token_name="NextToken",
      sagemaker_session=None,
      **kwargs,
  ):
      """Search for objects with the SageMaker API."""
      sagemaker_session = sagemaker_session or _utils.default_session()
      sagemaker_client = sagemaker_session.sagemaker_client
  
      next_token = None
      try:
          while True:
              search_request_kwargs = _boto_functions.to_boto(
                  kwargs, cls._custom_boto_names, cls._custom_boto_types
              )
              search_request_kwargs["Resource"] = search_resource
              if next_token:
                  search_request_kwargs[
                      boto_next_token_name
                  ] = next_token
              search_method = getattr(sagemaker_client, "search")
              search_method_response = search_method(
                  **search_request_kwargs
              )
              search_items = search_method_response.get("Results", [])
              next_token = search_method_response.get(
                  boto_next_token_name
              )
              for item in search_items:
                  # _TrialComponent class in experiments module is not public currently
                  class_name = cls.__name__.lstrip("_")
                  if class_name in item:
                      yield search_item_factory(item[class_name])
              if not next_token:
                  break
      except StopIteration:
          return
  
imports: from __future__ import absolute_import
  from sagemaker.apiutils import _boto_functions, _utils
  from sagemaker.utils import format_tags
label_desc: Use image node_id 3 for calling the Record obj's underlying member method code with example usage: obj._search(cls, search_resource, search_item_factory, boto_next_token_name, sagemaker_session) without return types