class_docstr: A boto based Active Record class based on convention of CRUD operations.
docstr: List objects from the SageMaker API.
docstr_tok: ["List","objects","from","the","SageMaker","API","."]
code: def _list(
      cls,
      boto_list_method,
      list_item_factory,
      boto_list_items_name,
      boto_next_token_name="NextToken",
      sagemaker_session=None,
      **kwargs,
  ):
      """List objects from the SageMaker API."""
      sagemaker_session = sagemaker_session or _utils.default_session()
      sagemaker_client = sagemaker_session.sagemaker_client
      next_token = None
      try:
          while True:
              list_request_kwargs = _boto_functions.to_boto(
                  kwargs, cls._custom_boto_names, cls._custom_boto_types
              )
              if next_token:
                  list_request_kwargs[boto_next_token_name] = next_token
              list_method = getattr(sagemaker_client, boto_list_method)
              list_method_response = list_method(**list_request_kwargs)
              list_items = list_method_response.get(
                  boto_list_items_name, []
              )
              next_token = list_method_response.get(
                  boto_next_token_name
              )
              for item in list_items:
                  yield list_item_factory(item)
              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 2 for calling the Record obj's underlying member method code with example usage: obj._list(cls, boto_list_method, list_item_factory, boto_list_items_name, boto_next_token_name, sagemaker_session) without return types